boostorg / bind

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

bind(f,...) without <R> breaks for std function objects in recent MSVC versions under /std:c++latest #21

Closed joaquintides closed 3 years ago

joaquintides commented 4 years ago

Starting (at least) in MSVC 19.20, /std:c++latest results in internal _HAS_CXX20 macro being defined, which effectively removes result_type nested typedef from std library function objects such as std::equal_to etc. This breaks code using boost::bind without explicit R specification.

pdimov commented 4 years ago

Wonderful.

pdimov commented 4 years ago

This seems a more recent change; Godbolt's 19.20-19.24 still have result_type, and so does Appveyor. My local 19.26, however, no longer has it.

joaquintides commented 4 years ago

According to VS changelog, the removal happened in VS 2019 16.6 (look for P0619R4), which is 19.26, I think.

pdimov commented 3 years ago

I believe this has been fixed with https://github.com/boostorg/bind/commit/b601e8924d9d86e18a02fec5418e9696678fb8a8.