Closed Lastique closed 1 year ago
Since Bind only depends on Core, and since people tend to dislike new dependencies in core libraries, it's probably better to use core::detail::is_same
here (or a local copy).
Ok, done. Note however, if we're going to phase away enable_if
from Boost.Core in favor of Boost.TypeTraits, we will have this problem again, and enable_if
is not quite as simple to duplicate.
It's actually pretty easy. https://github.com/boostorg/type_traits/blob/develop/include/boost/type_traits/enable_if.hpp
Core's enable_if has a different interface from the standard/type_traits one, though, so I doubt we'll be able to phase it out.
boost::core::is_same
is deprecated, so use the one from Boost.TypeTraits.Note: This introduces a dependency on Boost.TypeTraits. I figured, this is better than duplicating
is_same
or depending onboost::core::detail::is_same
. Boost.TypeTraits is a fairly lightweight nowdays. If you prefer a different solution, let me know.