merge new MPL version from 'mplbook' branch

[SVN r24874]
This commit is contained in:
Aleksey Gurtovoy
2004-09-02 15:41:37 +00:00
parent e2e70427cc
commit 1689c8ef83
1216 changed files with 89941 additions and 36780 deletions

View File

@@ -1,51 +1,48 @@
//-----------------------------------------------------------------------------
// boost mpl/test/lambda_args.cpp source file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
// Copyright Aleksey Gurtovoy 2001-2004
//
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// 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.
#include "boost/mpl/lambda.hpp"
#include "boost/mpl/apply.hpp"
#include "boost/type_traits/is_same.hpp"
#include "boost/static_assert.hpp"
// $Source$
// $Date$
// $Revision$
using namespace boost;
using namespace mpl;
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
class C {};
class incomplete;
typedef int C::* mem_ptr;
typedef int (C::* mem_fun_ptr)();
typedef int UDT::* mem_ptr;
typedef int (UDT::* mem_fun_ptr)();
#define AUX_LAMBDA_TEST(T) \
{BOOST_STATIC_ASSERT((apply1<lambda< is_same<_,T> >::type, T>::type::value));} \
{BOOST_STATIC_ASSERT((apply1<lambda< is_same<T,_> >::type, T>::type::value));} \
{BOOST_STATIC_ASSERT((apply2<lambda< is_same<_,_> >::type, T, T>::type::value));} \
{ MPL_ASSERT(( apply1<lambda< is_same<_,T> >::type, T> )); } \
{ MPL_ASSERT(( apply1<lambda< is_same<T,_> >::type, T> )); } \
{ MPL_ASSERT(( apply2<lambda< is_same<_,_> >::type, T, T> )); } \
/**/
int main()
MPL_TEST_CASE()
{
AUX_LAMBDA_TEST(C);
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
AUX_LAMBDA_TEST(incomplete);
AUX_LAMBDA_TEST( UDT );
AUX_LAMBDA_TEST( abstract );
AUX_LAMBDA_TEST( noncopyable );
AUX_LAMBDA_TEST( incomplete );
AUX_LAMBDA_TEST( int );
AUX_LAMBDA_TEST( void );
AUX_LAMBDA_TEST( double );
AUX_LAMBDA_TEST( int& );
AUX_LAMBDA_TEST( int* );
#if !BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
&& !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
AUX_LAMBDA_TEST( int[] );
#endif
AUX_LAMBDA_TEST(int);
AUX_LAMBDA_TEST(void);
AUX_LAMBDA_TEST(double);
AUX_LAMBDA_TEST(int&);
AUX_LAMBDA_TEST(int*);
// AUX_LAMBDA_TEST(int[]);
AUX_LAMBDA_TEST(int[10]);
AUX_LAMBDA_TEST(int (*)())
AUX_LAMBDA_TEST(mem_ptr);
AUX_LAMBDA_TEST(mem_fun_ptr);
return 0;
AUX_LAMBDA_TEST( int[10] );
AUX_LAMBDA_TEST( int (*)() )
AUX_LAMBDA_TEST( mem_ptr );
AUX_LAMBDA_TEST( mem_fun_ptr );
}