Created
November 18, 2019 21:49
-
-
Save vinniefalco/21763949057ae523e84845e0e74ddd4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class T, class = void> | |
struct is_storage : std::false_type {}; | |
template<class T> | |
struct is_storage<T, detail::void_t<decltype( | |
T::id, | |
T::need_free, | |
std::declval<void*&>() = | |
std::declval<T&>().allocate( | |
std::declval<std::size_t>(), | |
std::declval<std::size_t>()), | |
std::declval<T&>().deallocate( | |
std::declval<void*>(), | |
std::declval<std::size_t>(), | |
std::declval<std::size_t>()) | |
) > > : std::integral_constant<bool, | |
std::is_integral<T::id>::value && | |
std::is_convertible<T::need_free, bool>::value> | |
{ | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment