From 089d2db1048861912eb50cfcb4b51d13eeffa0de Mon Sep 17 00:00:00 2001 From: LeonineKing1199 Date: Wed, 8 Dec 2021 14:04:04 -0800 Subject: [PATCH] Remove traits detection mechanism --- .../boost/unordered/detail/implementation.hpp | 72 ------------------- 1 file changed, 72 deletions(-) diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index 97922941..b65d4bc0 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -844,78 +844,6 @@ namespace boost { } } -//////////////////////////////////////////////////////////////////////////// -// TRAITS TYPE DETECTION MECHANISM -// -// Used to implement traits that use a type if present, or a -// default otherwise. - -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1400 - -#define BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(tname) \ - template struct default_type_##tname \ - { \ - \ - template \ - static choice1::type test(choice1, typename X::tname* = 0); \ - \ - template static choice2::type test(choice2, void* = 0); \ - \ - struct DefaultWrap \ - { \ - typedef Default tname; \ - }; \ - \ - enum \ - { \ - value = (1 == sizeof(test(choose()))) \ - }; \ - \ - typedef typename boost::detail::if_true::BOOST_NESTED_TEMPLATE \ - then::type::tname type; \ - } - -#else - -namespace boost { - namespace unordered { - namespace detail { - template struct sfinae : T2 - { - }; - } - } -} - -#define BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(tname) \ - template struct default_type_##tname \ - { \ - \ - template \ - static typename boost::unordered::detail::sfinae::type test(choice1); \ - \ - template static choice2::type test(choice2); \ - \ - struct DefaultWrap \ - { \ - typedef Default tname; \ - }; \ - \ - enum \ - { \ - value = (1 == sizeof(test(choose()))) \ - }; \ - \ - typedef typename boost::detail::if_true::BOOST_NESTED_TEMPLATE \ - then::type::tname type; \ - } - -#endif - -#define BOOST_UNORDERED_DEFAULT_TYPE(T, tname, arg) \ - typename default_type_##tname::type - //////////////////////////////////////////////////////////////////////////////// // // Allocator traits