Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/mpl/test/lambda_args.cpp @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.4 KB
Line 
1
2// Copyright Aleksey Gurtovoy 2001-2004
3//
4// Distributed under the Boost Software License, Version 1.0.
5// (See accompanying file LICENSE_1_0.txt or copy at
6// http://www.boost.org/LICENSE_1_0.txt)
7//
8// See http://www.boost.org/libs/mpl for documentation.
9
10// $Source: /cvsroot/boost/boost/libs/mpl/test/lambda_args.cpp,v $
11// $Date: 2004/09/02 15:41:35 $
12// $Revision: 1.3 $
13
14#include <boost/mpl/lambda.hpp>
15#include <boost/mpl/apply.hpp>
16#include <boost/mpl/aux_/test.hpp>
17#include <boost/mpl/aux_/config/gcc.hpp>
18#include <boost/mpl/aux_/config/workaround.hpp>
19
20typedef int UDT::* mem_ptr;
21typedef int (UDT::* mem_fun_ptr)();
22
23#define AUX_LAMBDA_TEST(T) \
24    { MPL_ASSERT(( apply1<lambda< is_same<_,T> >::type, T> )); } \
25    { MPL_ASSERT(( apply1<lambda< is_same<T,_> >::type, T>  )); } \
26    { MPL_ASSERT(( apply2<lambda< is_same<_,_> >::type, T, T> )); } \
27/**/
28
29MPL_TEST_CASE()
30{
31    AUX_LAMBDA_TEST( UDT );
32    AUX_LAMBDA_TEST( abstract );
33    AUX_LAMBDA_TEST( noncopyable );
34    AUX_LAMBDA_TEST( incomplete );
35    AUX_LAMBDA_TEST( int );
36    AUX_LAMBDA_TEST( void );
37    AUX_LAMBDA_TEST( double );
38    AUX_LAMBDA_TEST( int& );
39    AUX_LAMBDA_TEST( int* );
40#if !BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
41    && !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
42    AUX_LAMBDA_TEST( int[] );
43#endif
44    AUX_LAMBDA_TEST( int[10] );
45    AUX_LAMBDA_TEST( int (*)() )
46    AUX_LAMBDA_TEST( mem_ptr );
47    AUX_LAMBDA_TEST( mem_fun_ptr );
48}
Note: See TracBrowser for help on using the repository browser.