Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to compile using boost 1.80 fails in boost.json #3

Open
RoyBellingan opened this issue Feb 5, 2023 · 2 comments
Open

Try to compile using boost 1.80 fails in boost.json #3

RoyBellingan opened this issue Feb 5, 2023 · 2 comments

Comments

@RoyBellingan
Copy link

RoyBellingan commented Feb 5, 2023

Maybe just add a check that 1.81 (or whatever required version) is present ?

If you want I can downgrade to report the actual error while compiling the example, but I think is just requiring a recent version as it was accessing nonexistent element.

It also fails using 1.81 using Opensuse tumbleweed, GCC 12.2.1 using C++11 mode with

In file included from /usr/include/boost/json/value_from.hpp:15,
                 from ../untitled/mustache/include/boost/mustache/renderer.hpp:15,
                 from ../untitled/mustache/include/boost/mustache/render.hpp:8,
                 from ../untitled/mustache/include/boost/mustache.hpp:8,
                 from ../untitled/main1.cpp:4:
/usr/include/boost/json/detail/value_from.hpp: In instantiation of ‘void boost::json::detail::value_from_helper(boost::json::value&, T&&, no_conversion_tag) [with T = const reference&]’:
/usr/include/boost/json/value_from.hpp:65:30:   required from ‘void boost::json::value_from(T&&, value&) [with T = const reference&]’
/usr/include/boost/json/value_from.hpp:120:21:   required from ‘boost::json::value boost::json::value_from(T&&, storage_ptr) [with T = const reference&]’
../untitled/mustache/include/boost/mustache/renderer.hpp:134:35:   required from ‘boost::mustache::renderer::renderer(const T1&, const T2&, boost::json::storage_ptr) [with T1 = reference; T2 = boost::json::object]’
../untitled/mustache/include/boost/mustache/render.hpp:17:24:   required from ‘void boost::mustache::render(boost::core::string_view, output_ref, const T1&, const T2&, boost::json::storage_ptr) [with T1 = reference; T2 = boost::json::object; boost::core::string_view = boost::core::basic_string_view<char>]’
../untitled/main1.cpp:85:25:   required from here
/usr/include/boost/json/detail/value_from.hpp:152:30: error: static assertion failed: No suitable tag_invoke overload found for the type
  152 |         !std::is_same<T, T>::value,
      |                              ^~~~~
/usr/include/boost/json/detail/value_from.hpp:152:30: note: ‘!(bool)std::integral_constant<bool, true>::value’ evaluates to false
@pdimov
Copy link
Owner

pdimov commented Feb 5, 2023

It's not going to work with 1.80, because the necessary Boost.JSON features have only been added in 1.81.

@RoyBellingan
Copy link
Author

Yes it will of course make sense once is mainlined to skip the check, but maybe during this initial / testing could help to inform the user to update ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants