You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to compile with clang version 8.0.1 I get an error because clang does not agree with the exception specification of the copy constructor on the parameter template class in expression.hpp. It looks like this dates back to 9e61d9f
(apologies I haven't tried newer clang or other compiler flags)
% /opt/rh/llvm-toolset-8.0/root/usr/bin/clang++ \
-I.../_deps/jsoncons-src/include \
-I.../_deps/jsoncons-src/tests \
-I.../_deps/jsoncons-src/third_party \
-I.../_deps/jsoncons-src/third_party/catch \
-o CMakeFiles/unit_tests.dir/jsonpath/src/jsonpath_flatten_tests.cpp.o \
-c .../_deps/jsoncons-src/tests/jsonpath/src/jsonpath_flatten_tests.cpp
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/expression.hpp:262:9: error: exception specification of explicitly defaulted
copy constructor does not match the calculated one
parameter(const parameter& other) noexcept = default;
^
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_vector.h:806:50: note: in instantiation of template class
'jsoncons::jsonpath::parameter<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >' requested here
{ return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
^
.../_deps/jsoncons-src/include/jsoncons/detail/span.hpp:90:40: note: in instantiation of member function
'std::vector<jsoncons::jsonpath::parameter<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >, std::allocator<jsoncons::jsonpath::parameter<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > > > >::size' requested here
:data_(c.data()), size_(c.size())
^
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/expression.hpp:1042:9: note: in instantiation of member function
'jsoncons::jsonpath::detail::decorator_function<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >::evaluate' requested here
decorator_function(jsoncons::optional<std::size_t> arity,
^
.../_deps/jsoncons-src/include/jsoncons/config/jsoncons_config.hpp:103:39: note: in instantiation of member function
'jsoncons::jsonpath::detail::decorator_function<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >::decorator_function' requested here
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
^
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/expression.hpp:2340:53: note: in instantiation of functiontemplate
specialization 'jsoncons::make_unique<jsoncons::jsonpath::detail::decorator_function<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >, jsoncons::detail::optional<unsigned long>, const std::function<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > (jsoncons::detail::span<const jsoncons::jsonpath::parameter<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >, 18446744073709551615>, std::error_code &)> &>' requested here
jsoncons::make_unique<decorator_function<Json>>(item.arity(),item.function()));
^
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp:2572:80: note: in instantiation of member function
'jsoncons::jsonpath::detail::static_resources<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> >, const jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > &>::static_resources' requested here
jsoncons::jsonpath::detail::static_resources<value_type,reference> resources(functions);
^
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp:2594:43: note: in instantiation of member function
'jsoncons::jsonpath::jsonpath_expression<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> >, const jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > &>::compile' requested here
return jsonpath_expression<Json>::compile(expr, functions);
^
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/json_query.hpp:22:21: note: in instantiation of functiontemplate
specialization 'jsoncons::jsonpath::make_expression<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >' requested here
auto expr = make_expression<Json>(path, functions);
^
.../_deps/jsoncons-src/tests/jsonpath/src/jsonpath_flatten_tests.cpp:114:40: note: in instantiation of functiontemplate
specialization 'jsoncons::jsonpath::json_query<jsoncons::basic_json<char, jsoncons::sorted_policy, std::allocator<char> > >' requested here
auto result = jsoncons::jsonpath::json_query(doc, path);
^
In file included from .../_deps/jsoncons-src/tests/jsonpath/src/jsonpath_flatten_tests.cpp:8:
In file included from .../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/flatten.hpp:18:
In file included from .../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/jsonpath.hpp:10:
In file included from .../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/json_query.hpp:11:
In file included from .../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/jsonpath_expression.hpp:20:
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/expression.hpp:266:20: error: exception specification of explicitly defaulted
copy assignment operator does not match the calculated one
parameter& operator=(const parameter& other) noexcept = default;
^
.../_deps/jsoncons-src/include/jsoncons_ext/jsonpath/expression.hpp:268:20: error: exception specification of explicitly defaulted
move assignment operator does not match the calculated one
parameter& operator=(parameter&& other) noexcept = default;
^
3 errors generated.
What compiler, architecture, and operating system?
Compiler: clang++ 8.0.1
Architecture (e.g. x86, x64) x86_64
Operating system: CentOS Linux release 7.9.2009
What jsoncons library version?
Latest release 0.167.0
Other release ______
master
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. I believe clang 8 doesn't like noexcept in combination with = default. With travis CI no longer a practical option for open source, we've lost some of our test coverage for older versions of clang, and this crept in. We'll address it shortly.
Trying to compile with clang version 8.0.1 I get an error because clang does not agree with the exception specification of the copy constructor on the parameter template class in expression.hpp. It looks like this dates back to 9e61d9f
(apologies I haven't tried newer clang or other compiler flags)
What compiler, architecture, and operating system?
What jsoncons library version?
The text was updated successfully, but these errors were encountered: