boostorg / bind

Boost.org bind module
http://boost.org/libs/bind
27 stars 49 forks source link

std::bit_not and other C++17 entities used in pre-C++17 environment #28

Closed joaquintides closed 2 years ago

joaquintides commented 2 years ago

As deduced from here, BOOST_CXX_VERSION >= 201700L for Clang 5.0 with -std=c++1z, yet std::bit_not etc. are not available in that environment, which causes compilation errors with include/boost/bind/detail/result_traits.hpp.

pdimov commented 2 years ago

"Although std::bit_not is added via post-C++11 proposal N3421, it is treated as a part of the resolution for LWG issue 660 (except for its transparent specialization std::bit_not<>) by common implementations, and thus available in their C++98/03 mode."

Probably need to guard the libstdc++ version. You seem to be using 4.8 in that config, which is an odd choice for a C++17 target (as 4.8 is barely C++11).

pdimov commented 2 years ago

/usr/bin/docker pull ubuntu:14.04

And using Ubuntu 14.04, at that. :-) FWIW, clang 5.0 from 18.04 works; it probably installs a newer libstdc++ automatically.

joaquintides commented 2 years ago

Hi, are you planning on tackling this one? Or should I just migrate my offending test case from Ubuntu 14.04 to 18.04 and forget about it?

pdimov commented 2 years ago

I will fix it. Sorry about forgetting about it, too many other things to do, and thanks for the reminder.

pdimov commented 2 years ago

Should be fixed on develop. If it isn't, please let me know.

joaquintides commented 2 years ago

I confirm the problem's solved. Thank you!