mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Removed is_comparable which is sometimes ambiguous
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@251 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
39ccffb881
commit
374cc95c0d
2 changed files with 0 additions and 122 deletions
|
|
@ -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 <turtle/is_comparable.hpp>
|
||||
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
#define BOOST_LIB_NAME boost_unit_test_framework
|
||||
#include <boost/config/auto_link.hpp>
|
||||
|
||||
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 > ));
|
||||
Loading…
Add table
Add a link
Reference in a new issue