Update of /cvsroot/boost/boost/libs/function_types/test/reconfiguration
In directory 
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18022/function_types/test/reconfiguration

Added Files:
        cc_preprocessing.cpp partial_arity_preprocessing.cpp 
        preprocessing_mode.cpp simple_test.hpp 
Log Message:
libs/function_types/* - check-in


--- NEW FILE: cc_preprocessing.cpp ---

// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).

//------------------------------------------------------------------------------

#define BOOST_FT_CC_PREPROCESSING 1
#include "simple_test.hpp"


--- NEW FILE: partial_arity_preprocessing.cpp ---

// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).

//------------------------------------------------------------------------------

#define BOOST_FT_MAX_ARITY 19
#include "simple_test.hpp"


--- NEW FILE: preprocessing_mode.cpp ---

// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).

//------------------------------------------------------------------------------

#define BOOST_FT_PREPROCESSING_MODE 1
#include "simple_test.hpp"


--- NEW FILE: simple_test.hpp ---

// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).

//------------------------------------------------------------------------------

#include <boost/mpl/assert.hpp>
#include <boost/mpl/equal.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/type_traits/is_same.hpp>

#include <boost/function_types/components.hpp>
#include <boost/function_types/function_type.hpp>
#include <boost/function_types/member_function_pointer.hpp>

namespace ft = boost::function_types;
namespace mpl = boost::mpl;

class C;
typedef void func(C &);
typedef int (C::* mem_func_ptr)(int);

typedef ft::components<func> func_components;
typedef ft::components<mem_func_ptr> mfp_components;

BOOST_MPL_ASSERT((
  mpl::equal< func_components::types, mpl::vector<void,C &> >
));
BOOST_MPL_ASSERT_RELATION(
  ::func_components::function_arity::value, ==, 1
);

BOOST_MPL_ASSERT((
  boost::is_same< ft::function_type< mpl::vector<void,C &> >::type, func >
));


BOOST_MPL_ASSERT((
  mpl::equal< mfp_components::types, mpl::vector<int,C &,int> >
));
BOOST_MPL_ASSERT_RELATION(
  ::mfp_components::function_arity::value, ==, 2
);

BOOST_MPL_ASSERT((
  boost::is_same< ft::member_function_pointer< mpl::vector<int,C &,int> 
>::type, mem_func_ptr >
));




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to