boostorg / config

Boost.org config module
http://boost.org/libs/config
72 stars 154 forks source link

Feature detection for std::size #250

Closed NAThompson closed 5 years ago

NAThompson commented 6 years ago

For the Catmull-Rom PR, we require C++17 std::size. I'm currently simulating C++17 feature support with requires cxx17_if_constexpr, which seems to work well enough (though this failure makes the mind boggle). However, it might be nicer to have the exact feature.

jzmaddock commented 5 years ago

I think all the major compilers are supporting SD-6 feature detection now (https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#recs.cpp17) so there's not much point in duplicating that effort. Can you use __cpp_lib_nonmember_container_access ? You will need to have included one of the std lib container headers, but I think you include <vector> anyway for that one?

morinmorin commented 5 years ago

You can also use boost::size from Boost.Range, I think.

NAThompson commented 5 years ago

@jzmaddock: Good to know about these macros, but I was thinking more about the feature detection in Jamfiles. Maybe the Jamfile syntax should mirror the SD-6 feature detection?