
On Jul 10, 2022, at 9:25 AM, Gero Peterhoff via Boost <boost@lists.boost.org> wrote:
Hello, if i include <boost/static_string.hpp> i get errors in std::variant:
/usr/include/c++/12/variant:774:72: Fehler: Templateargument 4 ist ungültig 774 | void_t<decltype(_Arr<_Ti>{{std::declval<_Tp>()}})>> | ^~ /usr/include/c++/12/variant:804:76: Fehler: Templateargument 3 ist ungültig 804 | struct __accepted_index<_Tp, _Variant, void_t<_FUN_type<_Tp, _Variant>>> | ^
Can you retrace that? boost 1.79 gcc 12.1 -std=gnu++2b openSuse Tumbleweed
I think we need more information. How about a complete, self-contained program? I tried compiling this: ``` #include <boost/static_string.hpp> #include <variant> int main () {} ``` On godbolt, using “x86_64 g++ 12.1” with options "-std=gnu++2b -I/opt/compiler-explorer/libs/boost_1_79_0” And while I got a warning about `unary_function`, I got no errors. In file included from /opt/compiler-explorer/libs/boost_1_79_0/boost/static_string/config.hpp:151, from /opt/compiler-explorer/libs/boost_1_79_0/boost/static_string/static_string.hpp:16, from /opt/compiler-explorer/libs/boost_1_79_0/boost/static_string.hpp:12, from <source>:1: /opt/compiler-explorer/libs/boost_1_79_0/boost/container_hash/hash.hpp:132:33: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations] 132 | struct hash_base : std::unary_function<T, std::size_t> {}; | ^~~~~~~~~~~~~~ In file included from /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/functional:49, from /opt/compiler-explorer/libs/boost_1_79_0/boost/container_hash/hash.hpp:20: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_function.h:117:12: note: declared here 117 | struct unary_function | ^~~~~~~~~~~~~~ Compiler returned: 0 — Marshall