Compare commits

..

11 Commits

4 changed files with 6 additions and 133 deletions

View File

@ -1,21 +0,0 @@
#----------------------------------------------------------------------------
# This file was automatically generated from the original CMakeLists.txt file
# Add a variable to hold the headers for the library
set (lib_headers
function_types
)
# Add a library target to the build system
boost_library_project(
function_types
# SRCDIRS
TESTDIRS test
HEADERS ${lib_headers}
# DOCDIRS
# DESCRIPTION
MODULARIZED
# AUTHORS
# MAINTAINERS
)

View File

@ -1 +0,0 @@
boost_module(function_types DEPENDS mpl detail)

View File

@ -1,70 +0,0 @@
# Get the boost dependencies for the tests
boost_additional_test_dependencies(function_types BOOST_DEPENDS test fusion)
boost_test_compile(is_function classification/is_function.cpp)
boost_test_compile(is_function_pointer classification/is_function_pointer.cpp)
boost_test_compile(is_function_reference classification/is_function_reference.cpp)
boost_test_compile(is_member_function_pointer classification/is_member_function_pointer.cpp)
boost_test_compile(is_member_object_pointer classification/is_member_object_pointer.cpp)
boost_test_compile(is_callable_builtin classification/is_callable_builtin.cpp)
boost_test_compile(is_nonmember_callable_builtin classification/is_nonmember_callable_builtin.cpp)
boost_test_compile(is_member_pointer classification/is_member_pointer.cpp)
boost_test_compile(is_cv_mem_func_ptr classification/is_cv_mem_func_ptr.cpp)
boost_test_compile(is_variadic classification/is_variadic.cpp)
boost_test_compile(is_cv_pointer classification/is_cv_pointer.cpp)
# [ compile classification/is_cv_function.cpp)
# Decomposition
boost_test_compile(components decomposition/components.cpp)
boost_test_compile(result_type decomposition/result_type.cpp)
boost_test_compile(function_arity decomposition/function_arity.cpp)
boost_test_compile(parameter_types decomposition/parameter_types.cpp)
boost_test_compile(components_seq decomposition/components_seq.cpp)
boost_test_compile(class_type_transform decomposition/class_type_transform.cpp)
boost_test_compile_fail(result_type_fail decomposition/result_type_fail.cpp)
boost_test_compile_fail(parameter_types_fail decomposition/parameter_types_fail.cpp)
boost_test_compile_fail(function_arity_fail decomposition/function_arity_fail.cpp)
# Synthesis
boost_test_compile(function_type synthesis/function_type.cpp)
boost_test_compile(function_pointer synthesis/function_pointer.cpp)
boost_test_compile(function_reference synthesis/function_reference.cpp)
boost_test_compile(member_function_pointer synthesis/member_function_pointer.cpp)
boost_test_compile(member_object_pointer synthesis/member_object_pointer.cpp)
boost_test_compile(transformation synthesis/transformation.cpp)
boost_test_compile(mem_func_ptr_cv1 synthesis/mem_func_ptr_cv1.cpp)
boost_test_compile(mem_func_ptr_cv2 synthesis/mem_func_ptr_cv2.cpp)
boost_test_compile(mem_func_ptr_cv_ptr_to_this synthesis/mem_func_ptr_cv_ptr_to_this.cpp)
boost_test_compile(variadic_function_synthesis synthesis/variadic_function_synthesis.cpp)
# [ compile synthesis/cv_function_synthesis.cpp)
# Reconfiguration
boost_test_compile(preprocessing_mode reconfiguration/preprocessing_mode.cpp)
boost_test_compile(partial_arity_preprocessing reconfiguration/partial_arity_preprocessing.cpp)
boost_test_compile(cc_preprocessing reconfiguration/cc_preprocessing.cpp)
# Custom calling conventions
boost_test_compile(nonmember_ccs custom_ccs/nonmember_ccs.cpp)
boost_test_compile(nonmember_ccs_exact custom_ccs/nonmember_ccs_exact.cpp)
message(STATUS "Function_Types/test/custom_ccs/member_ccs.cpp Needs love")
#boost_test_compile(member_ccs custom_ccs/member_ccs.cpp)
message(STATUS "Function_Types/test/custom_ccs/member_ccs_exact.cpp Needs love")
#boost_test_compile(member_ccs_exact custom_ccs/member_ccs_exact.cpp)
# Code from the examples
# Include the "example" directory
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/example")
boost_test_compile(interpreter_example ../example/interpreter_example.cpp)
boost_test_compile(result_of_example ../example/result_of_example.cpp)
boost_test_compile(interface_example ../example/interface_example.cpp)
message(STATUS "Function_Types/example/fast_mem_fn_example.cpp Needs love")
#boost_test_compile(fast_mem_fn_example ../example/fast_mem_fn_example.cpp)
boost_test_compile(macro_type_args_example ../example/macro_type_args_example.cpp)

View File

@ -16,19 +16,12 @@ namespace ft = boost::function_types;
class C;
typedef C func();
typedef C const c_func();
typedef C (*func_ptr)();
typedef C const (*c_func_ptr)();
typedef C (&func_ref)();
typedef C const (&c_func_ref)();
typedef C (C::*mem_func_ptr)();
typedef C const (C::*c_mem_func_ptr)();
typedef C (C::*mem_func_ptr_c)() const;
typedef C const (C::*c_mem_func_ptr_c)() const;
typedef C (C::*mem_func_ptr_v)() volatile;
typedef C const (C::*c_mem_func_ptr_v)() volatile;
typedef C (C::*mem_func_ptr_cv)() const volatile;
typedef C const (C::*c_mem_func_ptr_cv)() const volatile;
typedef C (C::*c_mem_func_ptr)() const;
typedef C (C::*v_mem_func_ptr)() volatile;
typedef C (C::*cv_mem_func_ptr)() const volatile;
typedef int C::* mem_ptr;
typedef int const C::* c_mem_ptr;
@ -36,56 +29,28 @@ BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<func>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_func>::type,C const>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<func_ptr>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_func_ptr>::type,C const>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<func_ref>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_func_ref>::type,C const>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<mem_func_ptr>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_mem_func_ptr>::type,C const>
boost::is_same<ft::result_type<c_mem_func_ptr>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<mem_func_ptr_c>::type,C>
boost::is_same<ft::result_type<v_mem_func_ptr>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_mem_func_ptr_c>::type,C const>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<mem_func_ptr_v>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_mem_func_ptr_v>::type,C const>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<mem_func_ptr_cv>::type,C>
));
BOOST_MPL_ASSERT((
boost::is_same<ft::result_type<c_mem_func_ptr_cv>::type,C const>
boost::is_same<ft::result_type<cv_mem_func_ptr>::type,C>
));
BOOST_MPL_ASSERT((