diff --git a/src/libraries/turtle/is_comparable.hpp b/src/libraries/turtle/is_comparable.hpp deleted file mode 100644 index 24348cc..0000000 --- a/src/libraries/turtle/is_comparable.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright Mathieu Champlon 2011 -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef MOCK_IS_COMPARABLE_HPP_INCLUDED -#define MOCK_IS_COMPARABLE_HPP_INCLUDED - -#include "yes_no_type.hpp" -#include "sink.hpp" -#include -#include -#include - -#ifdef _MSC_VER -#pragma warning( push ) -#pragma warning( disable: 4913 ) -#endif - -namespace mock -{ -namespace detail -{ -namespace comparable -{ - yes_type operator==( sink, sink ); - - template< typename L, typename R > - struct impl - { - static BOOST_DEDUCED_TYPENAME boost::remove_reference< L >::type* l; - static BOOST_DEDUCED_TYPENAME boost::remove_reference< R >::type* r; - enum { value = sizeof( yes_type(), *l == *r, yes_type() ) == sizeof( yes_type ) }; - }; -} - - template< typename L, typename R > - struct is_comparable : boost::mpl::bool_< comparable::impl< L, R >::value > - {}; -} -} - -#ifdef _MSC_VER -#pragma warning( pop ) -#endif - -#endif // #ifndef MOCK_IS_COMPARABLE_HPP_INCLUDED diff --git a/src/tests/turtle_test/is_comparable_test.cpp b/src/tests/turtle_test/is_comparable_test.cpp deleted file mode 100644 index d94cb75..0000000 --- a/src/tests/turtle_test/is_comparable_test.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright Mathieu Champlon 2011 -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#include - -#include -#define BOOST_LIB_NAME boost_unit_test_framework -#include - -namespace -{ - struct declared_but_not_defined; - - struct non_comparable - {}; - - struct comparable - {}; - bool operator==( const comparable&, int ); - bool operator==( int, const comparable& ); - - struct derived_from_comparable : comparable - {}; - - struct convertible_to_comparable - { - operator comparable() const; - }; - - template< typename T > - struct template_comparable - {}; - template< typename T > - bool operator==( const template_comparable< T >&, int ); - template< typename T > - bool operator==( int, const template_comparable< T >& ); - - struct comparable_to_everything - { - template< typename T > - bool operator==( const T& ) const; - }; -} - -BOOST_MPL_ASSERT_NOT(( mock::detail::is_comparable< int, declared_but_not_defined > )); -BOOST_MPL_ASSERT_NOT(( mock::detail::is_comparable< declared_but_not_defined, int > )); - -BOOST_MPL_ASSERT_NOT(( mock::detail::is_comparable< int, non_comparable > )); -BOOST_MPL_ASSERT_NOT(( mock::detail::is_comparable< non_comparable, int > )); - -BOOST_MPL_ASSERT(( mock::detail::is_comparable< int, comparable > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< int, comparable& > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< int, const comparable& > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< comparable, int > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< const comparable&, int > )); - -BOOST_MPL_ASSERT(( mock::detail::is_comparable< int, template_comparable< int > > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< template_comparable< int >, int > )); - -BOOST_MPL_ASSERT(( mock::detail::is_comparable< int, derived_from_comparable > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< derived_from_comparable, int > )); - -BOOST_MPL_ASSERT(( mock::detail::is_comparable< int, convertible_to_comparable > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< convertible_to_comparable, int > )); - -BOOST_MPL_ASSERT_NOT(( mock::detail::is_comparable< int, comparable_to_everything > )); -BOOST_MPL_ASSERT(( mock::detail::is_comparable< comparable_to_everything, int > ));