1
0
forked from boostorg/move

Removed commented code.

This commit is contained in:
Ion Gaztañaga
2015-01-08 16:03:04 +01:00
parent ca12c962c8
commit 0bb4e06cff

View File

@@ -167,102 +167,3 @@ int main()
return ::boost::report_errors();
}
#include <boost/move/detail/config_end.hpp>
/*
#include <boost/core/lightweight_test.hpp>
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<typename T>
no_type is_private_type(T const &);
yes_type is_private_type(private_type const &);
template <typename Type>
class has_member_function_named_swap
{
struct BaseMixin
{
void swap();
};
struct Base : public Type, public BaseMixin { Base(); };
template <typename T, T t> class Helper{};
template <typename U>
static no_type deduce(U*, Helper<void (BaseMixin::*)(), &U::swap>* = 0);
static yes_type deduce(...);
public:
static const bool value = sizeof(yes_type) == sizeof(deduce((Base*)(0)));
};
template<typename Fun, bool HasFunc>
struct has_member_swap_impl
{
static const bool value = false;
};
template<typename Fun>
struct has_member_swap_impl<Fun, true>
{
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<typename Fun>
struct has_member_swap : public has_member_swap_impl
<Fun, has_member_function_named_swap<Fun>::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<noswap>::value);
BOOST_TEST(boost_move_member_swap::has_member_swap<yesswap>::value);
BOOST_TEST(!boost_move_member_swap::has_member_swap<noneswap>::value);
return boost::report_errors();
}
*/