mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-01 05:44:37 +02:00
Fixed tests compilation.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
#ifndef BOOST_MPL_AUX_IS_SAME_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_IS_SAME_HPP_INCLUDED
|
||||
|
||||
// Copyright Andrey Semashev 2014
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< typename T, typename U >
|
||||
struct is_same : mpl::false_ {};
|
||||
|
||||
template< typename T >
|
||||
struct is_same< T, T > : mpl::true_ {};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_IS_SAME_HPP_INCLUDED
|
@@ -17,7 +17,6 @@
|
||||
#include <boost/mpl/aux_/test/test_case.hpp>
|
||||
#include <boost/mpl/aux_/test/data.hpp>
|
||||
#include <boost/mpl/aux_/test/assert.hpp>
|
||||
#include <boost/mpl/aux_/is_same.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
int main()
|
||||
@@ -27,6 +26,5 @@ int main()
|
||||
|
||||
using namespace boost;
|
||||
using namespace mpl;
|
||||
using boost::mpl::aux_::is_same;
|
||||
|
||||
#endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <boost/mpl/aux_/largest_int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#include <boost/mpl/next_prior.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -15,6 +15,8 @@
|
||||
#include <boost/mpl/iterator_tags.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
template< int pos > struct iter
|
||||
{
|
||||
typedef mpl::bidirectional_iterator_tag category;
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
template< typename T > struct std_vector
|
||||
{
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/preprocessor/repeat.hpp>
|
||||
#include <boost/preprocessor/comma_if.hpp>
|
||||
|
@@ -14,11 +14,12 @@
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/vector/vector10_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
template< typename Seq, int n > struct at_test
|
||||
{
|
||||
typedef typename at_c<Seq,n>::type t;
|
||||
MPL_ASSERT(( is_same< t, integral_c<int,9-n> > ));
|
||||
MPL_ASSERT(( boost::is_same< t, integral_c<int,9-n> > ));
|
||||
MPL_ASSERT_RELATION( t::value, ==, 9 - n );
|
||||
};
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -41,12 +42,12 @@ MPL_TEST_CASE()
|
||||
MPL_ASSERT_NOT(( empty<d2> ));
|
||||
MPL_ASSERT_NOT(( empty<d9> ));
|
||||
|
||||
MPL_ASSERT(( is_same< front<d1>::type,char > ));
|
||||
MPL_ASSERT(( is_same< back<d1>::type,char > ));
|
||||
MPL_ASSERT(( is_same< front<d2>::type,char > ));
|
||||
MPL_ASSERT(( is_same< back<d2>::type,long > ));
|
||||
MPL_ASSERT(( is_same< front<d9>::type,char > ));
|
||||
MPL_ASSERT(( is_same< back<d9>::type,int > ));
|
||||
MPL_ASSERT(( boost::is_same< front<d1>::type,char > ));
|
||||
MPL_ASSERT(( boost::is_same< back<d1>::type,char > ));
|
||||
MPL_ASSERT(( boost::is_same< front<d2>::type,char > ));
|
||||
MPL_ASSERT(( boost::is_same< back<d2>::type,long > ));
|
||||
MPL_ASSERT(( boost::is_same< front<d9>::type,char > ));
|
||||
MPL_ASSERT(( boost::is_same< back<d9>::type,int > ));
|
||||
}
|
||||
|
||||
|
||||
@@ -58,9 +59,9 @@ MPL_TEST_CASE()
|
||||
typedef next<i1>::type i2;
|
||||
typedef next<i2>::type i3;
|
||||
|
||||
MPL_ASSERT(( is_same<deref<i1>::type,char> ));
|
||||
MPL_ASSERT(( is_same<deref<i2>::type,long> ));
|
||||
MPL_ASSERT(( is_same< i3, end<d2>::type > ));
|
||||
MPL_ASSERT(( boost::is_same<deref<i1>::type,char> ));
|
||||
MPL_ASSERT(( boost::is_same<deref<i2>::type,long> ));
|
||||
MPL_ASSERT(( boost::is_same< i3, end<d2>::type > ));
|
||||
}
|
||||
|
||||
MPL_TEST_CASE()
|
||||
@@ -68,14 +69,14 @@ MPL_TEST_CASE()
|
||||
typedef deque<> d0;
|
||||
|
||||
typedef push_back<d0,int>::type d1;
|
||||
MPL_ASSERT(( is_same< back<d1>::type,int > ));
|
||||
MPL_ASSERT(( boost::is_same< back<d1>::type,int > ));
|
||||
|
||||
typedef push_front<d1,char>::type d2;
|
||||
MPL_ASSERT(( is_same< back<d2>::type,int > ));
|
||||
MPL_ASSERT(( is_same< front<d2>::type,char > ));
|
||||
MPL_ASSERT(( boost::is_same< back<d2>::type,int > ));
|
||||
MPL_ASSERT(( boost::is_same< front<d2>::type,char > ));
|
||||
|
||||
typedef push_back<d2,long>::type d3;
|
||||
MPL_ASSERT(( is_same< back<d3>::type,long > ));
|
||||
MPL_ASSERT(( boost::is_same< back<d3>::type,long > ));
|
||||
}
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -20,6 +20,8 @@
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef list<int,char,long,short,char,long,double,long> types;
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <boost/mpl/inherit.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
struct her { typedef her herself; };
|
||||
struct my { typedef my myself; };
|
||||
|
@@ -19,6 +19,8 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
typedef int UDT::* mem_ptr;
|
||||
typedef int (UDT::* mem_fun_ptr)();
|
||||
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC,<= 1200)
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <boost/mpl/find.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
/*
|
||||
struct test_data1
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include <boost/mpl/prior.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -15,6 +15,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
struct no_push_back_tag {};
|
||||
|
||||
struct no_push_back
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
struct no_push_front_tag {};
|
||||
|
||||
struct no_push_front
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/back.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
// Use templates for testing so that GCC will show us the actual types involved
|
||||
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace test { namespace {
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
template< typename S, typename S::value_type k >
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/add_pointer.hpp>
|
||||
|
||||
|
||||
|
@@ -25,6 +25,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <=1200)
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
Reference in New Issue
Block a user