What happened?
I am trying to upgrade to Boost 1.89.0.bcr.2 but I get a compile error:
external/boost.context+/include/boost/context/detail/invoke.hpp:29:19: error: no type named 'result_of' in namespace 'std'
29 | typename std::result_of< Fn &&( Args && ... ) >::type
| ~~~~~~~~~~~~~~^~~~~~~~~
result_of is removed in c++20. I am using in my .bazelrc
build --cxxopt "-std=c++20" --host_cxxopt "-std=c++20"
I have diagnosed this to be because of parse_headers in boost.context. Boost itself will avoid including this header in c++20 but parse_headers doesn't realize that. I can workaround it with a single_version_override to do - features = ["parse_headers"], but it is ugly.
I'm not enough of a bazel expert to propose a better solution but I hope other can.
Version
Development (host) and target OS/architectures: Ubuntu 24
Output of bazel --version: bazel 8.5.0
Version of relevant rules from the WORKSPACE or MODULE.bazel file: See description
Language(s) and/or frameworks involved: c++20 and Boost
How to reproduce
Any other information?
No response
What happened?
I am trying to upgrade to Boost 1.89.0.bcr.2 but I get a compile error:
result_ofis removed in c++20. I am using in my .bazelrcI have diagnosed this to be because of parse_headers in boost.context. Boost itself will avoid including this header in c++20 but parse_headers doesn't realize that. I can workaround it with a
single_version_overrideto do- features = ["parse_headers"],but it is ugly.I'm not enough of a bazel expert to propose a better solution but I hope other can.
Version
Development (host) and target OS/architectures: Ubuntu 24
Output of
bazel --version: bazel 8.5.0Version of relevant rules from the
WORKSPACEorMODULE.bazelfile: See descriptionLanguage(s) and/or frameworks involved: c++20 and Boost
How to reproduce
Any other information?
No response