From 0bb4e06cff555794b692bebd637b29ae92b4b034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 8 Jan 2015 16:03:04 +0100 Subject: [PATCH] Removed commented code. --- test/adl_move_swap.cpp | 99 ------------------------------------------ 1 file changed, 99 deletions(-) diff --git a/test/adl_move_swap.cpp b/test/adl_move_swap.cpp index 863e893..9aeae43 100644 --- a/test/adl_move_swap.cpp +++ b/test/adl_move_swap.cpp @@ -167,102 +167,3 @@ int main() return ::boost::report_errors(); } #include - -/* -#include - -namespace boost_move_member_swap { - -struct dont_care -{ - dont_care(...); -}; - -struct private_type -{ - static private_type p; - private_type const &operator,(int) const; -}; - -typedef char yes_type; -struct no_type{ char dummy[2]; }; - -template -no_type is_private_type(T const &); - -yes_type is_private_type(private_type const &); - -template -class has_member_function_named_swap -{ - struct BaseMixin - { - void swap(); - }; - - struct Base : public Type, public BaseMixin { Base(); }; - template class Helper{}; - - template - static no_type deduce(U*, Helper* = 0); - static yes_type deduce(...); - - public: - static const bool value = sizeof(yes_type) == sizeof(deduce((Base*)(0))); -}; - -template -struct has_member_swap_impl -{ - static const bool value = false; -}; - -template -struct has_member_swap_impl -{ - struct FunWrap : Fun - { - FunWrap(); - - using Fun::swap; - private_type swap(dont_care) const; - }; - - static Fun &declval_fun(); - static FunWrap declval_wrap(); - - static bool const value = - sizeof(no_type) == sizeof(is_private_type( (declval_wrap().swap(declval_fun()), 0)) ); -}; - -template -struct has_member_swap : public has_member_swap_impl - ::value> -{}; - -} //namespace boost_move_member_swap - -class noswap -{ - public: - void swap(); -}; - -class noneswap -{ -}; - -class yesswap -{ - public: - void swap(yesswap&); -}; - -int main() -{ - BOOST_TEST(!boost_move_member_swap::has_member_swap::value); - BOOST_TEST(boost_move_member_swap::has_member_swap::value); - BOOST_TEST(!boost_move_member_swap::has_member_swap::value); - return boost::report_errors(); -} -*/ \ No newline at end of file