From b7da1bd1ab1f58c21c83ca2df3fc1d6a12c642de Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Fri, 28 Nov 2008 11:38:38 +0000 Subject: [PATCH] adds tests with const result [SVN r49980] --- test/decomposition/result_type.cpp | 47 ++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/test/decomposition/result_type.cpp b/test/decomposition/result_type.cpp index 8f1157d..f55eb85 100644 --- a/test/decomposition/result_type.cpp +++ b/test/decomposition/result_type.cpp @@ -16,12 +16,19 @@ 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 (C::*c_mem_func_ptr)() const; -typedef C (C::*v_mem_func_ptr)() volatile; -typedef C (C::*cv_mem_func_ptr)() const volatile; +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 int C::* mem_ptr; typedef int const C::* c_mem_ptr; @@ -29,28 +36,56 @@ BOOST_MPL_ASSERT(( boost::is_same::type,C> )); +BOOST_MPL_ASSERT(( + boost::is_same::type,C const> +)); + BOOST_MPL_ASSERT(( boost::is_same::type,C> )); +BOOST_MPL_ASSERT(( + boost::is_same::type,C const> +)); + BOOST_MPL_ASSERT(( boost::is_same::type,C> )); +BOOST_MPL_ASSERT(( + boost::is_same::type,C const> +)); + BOOST_MPL_ASSERT(( boost::is_same::type,C> )); BOOST_MPL_ASSERT(( - boost::is_same::type,C> + boost::is_same::type,C const> )); BOOST_MPL_ASSERT(( - boost::is_same::type,C> + boost::is_same::type,C> )); BOOST_MPL_ASSERT(( - boost::is_same::type,C> + boost::is_same::type,C const> +)); + +BOOST_MPL_ASSERT(( + boost::is_same::type,C> +)); + +BOOST_MPL_ASSERT(( + boost::is_same::type,C const> +)); + +BOOST_MPL_ASSERT(( + boost::is_same::type,C> +)); + +BOOST_MPL_ASSERT(( + boost::is_same::type,C const> )); BOOST_MPL_ASSERT((