From 3423ec4c524ae33a33688326efc0aba1f14e7aa5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 4 Dec 2004 11:36:36 +0000 Subject: [PATCH] Added BOOST_NO_IS_ABSTRACT. [SVN r26422] --- config.htm | 8 + configure | 4 +- include/boost/config/compiler/borland.hpp | 1 + include/boost/config/compiler/gcc.hpp | 38 +- include/boost/config/compiler/visualc.hpp | 1 + test/Jamfile | 338 +++---- test/boost_no_is_abstract.ipp | 52 + test/boost_no_std_min_max.ipp | 4 +- test/config_test.cpp | 1054 +++++++++++---------- test/has_2arg_use_facet_fail.cpp | 17 +- test/has_2arg_use_facet_pass.cpp | 15 +- test/has_bethreads_fail.cpp | 17 +- test/has_bethreads_pass.cpp | 15 +- test/has_clock_gettime_fail.cpp | 17 +- test/has_clock_gettime_pass.cpp | 15 +- test/has_dirent_h_fail.cpp | 17 +- test/has_dirent_h_pass.cpp | 15 +- test/has_ftime_fail.cpp | 17 +- test/has_ftime_pass.cpp | 15 +- test/has_gettimeofday_fail.cpp | 17 +- test/has_gettimeofday_pass.cpp | 15 +- test/has_hash_fail.cpp | 17 +- test/has_hash_pass.cpp | 15 +- test/has_long_long_fail.cpp | 17 +- test/has_long_long_pass.cpp | 15 +- test/has_macro_use_facet_fail.cpp | 17 +- test/has_macro_use_facet_pass.cpp | 15 +- test/has_ms_int64_fail.cpp | 17 +- test/has_ms_int64_pass.cpp | 15 +- test/has_nanosleep_fail.cpp | 17 +- test/has_nanosleep_pass.cpp | 15 +- test/has_nl_types_h_fail.cpp | 17 +- test/has_nl_types_h_pass.cpp | 15 +- test/has_nrvo_fail.cpp | 17 +- test/has_nrvo_pass.cpp | 15 +- test/has_part_alloc_fail.cpp | 17 +- test/has_part_alloc_pass.cpp | 15 +- test/has_pthread_delay_np_fail.cpp | 17 +- test/has_pthread_delay_np_pass.cpp | 15 +- test/has_pthread_ma_st_fail.cpp | 17 +- test/has_pthread_ma_st_pass.cpp | 15 +- test/has_pthread_yield_fail.cpp | 17 +- test/has_pthread_yield_pass.cpp | 15 +- test/has_pthreads_fail.cpp | 17 +- test/has_pthreads_pass.cpp | 15 +- test/has_sched_yield_fail.cpp | 17 +- test/has_sched_yield_pass.cpp | 15 +- test/has_sgi_type_traits_fail.cpp | 17 +- test/has_sgi_type_traits_pass.cpp | 15 +- test/has_sigaction_fail.cpp | 17 +- test/has_sigaction_pass.cpp | 15 +- test/has_slist_fail.cpp | 17 +- test/has_slist_pass.cpp | 15 +- test/has_stdint_h_fail.cpp | 17 +- test/has_stdint_h_pass.cpp | 15 +- test/has_stlp_use_facet_fail.cpp | 17 +- test/has_stlp_use_facet_pass.cpp | 15 +- test/has_unistd_h_fail.cpp | 17 +- test/has_unistd_h_pass.cpp | 15 +- test/has_vc6_mem_templ_fail.cpp | 17 +- test/has_vc6_mem_templ_pass.cpp | 15 +- test/has_vc_iterator_fail.cpp | 17 +- test/has_vc_iterator_pass.cpp | 15 +- test/has_winthreads_fail.cpp | 17 +- test/has_winthreads_pass.cpp | 15 +- test/no_arg_dep_lookup_fail.cpp | 17 +- test/no_arg_dep_lookup_pass.cpp | 17 +- test/no_array_type_spec_fail.cpp | 17 +- test/no_array_type_spec_pass.cpp | 17 +- test/no_auto_ptr_fail.cpp | 17 +- test/no_auto_ptr_pass.cpp | 17 +- test/no_bcb_partial_spec_fail.cpp | 17 +- test/no_bcb_partial_spec_pass.cpp | 17 +- test/no_ctype_functions_fail.cpp | 17 +- test/no_ctype_functions_pass.cpp | 17 +- test/no_cv_spec_fail.cpp | 17 +- test/no_cv_spec_pass.cpp | 17 +- test/no_cv_void_spec_fail.cpp | 17 +- test/no_cv_void_spec_pass.cpp | 17 +- test/no_cwchar_fail.cpp | 17 +- test/no_cwchar_pass.cpp | 17 +- test/no_cwctype_fail.cpp | 17 +- test/no_cwctype_pass.cpp | 17 +- test/no_ded_typename_fail.cpp | 17 +- test/no_ded_typename_pass.cpp | 17 +- test/no_dep_nested_class_fail.cpp | 17 +- test/no_dep_nested_class_pass.cpp | 17 +- test/no_dep_val_param_fail.cpp | 17 +- test/no_dep_val_param_pass.cpp | 17 +- test/no_excep_std_fail.cpp | 17 +- test/no_excep_std_pass.cpp | 17 +- test/no_exceptions_fail.cpp | 17 +- test/no_exceptions_pass.cpp | 17 +- test/no_exp_func_tem_arg_fail.cpp | 17 +- test/no_exp_func_tem_arg_pass.cpp | 17 +- test/no_func_tmp_order_fail.cpp | 17 +- test/no_func_tmp_order_pass.cpp | 17 +- test/no_i64_limits_fail.cpp | 17 +- test/no_i64_limits_pass.cpp | 17 +- test/no_inline_memb_init_fail.cpp | 17 +- test/no_inline_memb_init_pass.cpp | 17 +- test/no_integral_int64_t_fail.cpp | 17 +- test/no_integral_int64_t_pass.cpp | 17 +- test/no_is_abstract_fail.cpp | 34 + test/no_is_abstract_pass.cpp | 34 + test/no_iter_construct_fail.cpp | 17 +- test/no_iter_construct_pass.cpp | 17 +- test/no_limits_const_exp_fail.cpp | 17 +- test/no_limits_const_exp_pass.cpp | 17 +- test/no_limits_fail.cpp | 17 +- test/no_limits_pass.cpp | 17 +- test/no_ll_limits_fail.cpp | 17 +- test/no_ll_limits_pass.cpp | 17 +- test/no_mem_func_spec_fail.cpp | 17 +- test/no_mem_func_spec_pass.cpp | 17 +- test/no_mem_tem_keyword_fail.cpp | 17 +- test/no_mem_tem_keyword_pass.cpp | 17 +- test/no_mem_tem_pnts_fail.cpp | 17 +- test/no_mem_tem_pnts_pass.cpp | 17 +- test/no_mem_templ_frnds_fail.cpp | 17 +- test/no_mem_templ_frnds_pass.cpp | 17 +- test/no_mem_templates_fail.cpp | 17 +- test/no_mem_templates_pass.cpp | 17 +- test/no_ops_in_namespace_fail.cpp | 17 +- test/no_ops_in_namespace_pass.cpp | 17 +- test/no_partial_spec_fail.cpp | 17 +- test/no_partial_spec_pass.cpp | 17 +- test/no_priv_aggregate_fail.cpp | 17 +- test/no_priv_aggregate_pass.cpp | 17 +- test/no_ptr_mem_const_fail.cpp | 17 +- test/no_ptr_mem_const_pass.cpp | 17 +- test/no_ret_det_fail.cpp | 17 +- test/no_ret_det_pass.cpp | 17 +- test/no_sfinae_fail.cpp | 17 +- test/no_sfinae_pass.cpp | 17 +- test/no_sstream_fail.cpp | 17 +- test/no_sstream_pass.cpp | 17 +- test/no_std_allocator_fail.cpp | 17 +- test/no_std_allocator_pass.cpp | 17 +- test/no_std_distance_fail.cpp | 17 +- test/no_std_distance_pass.cpp | 17 +- test/no_std_iter_traits_fail.cpp | 17 +- test/no_std_iter_traits_pass.cpp | 17 +- test/no_std_iterator_fail.cpp | 17 +- test/no_std_iterator_pass.cpp | 17 +- test/no_std_locale_fail.cpp | 17 +- test/no_std_locale_pass.cpp | 17 +- test/no_std_messages_fail.cpp | 17 +- test/no_std_messages_pass.cpp | 17 +- test/no_std_min_max_fail.cpp | 17 +- test/no_std_min_max_pass.cpp | 17 +- test/no_std_oi_assign_fail.cpp | 17 +- test/no_std_oi_assign_pass.cpp | 17 +- test/no_std_use_facet_fail.cpp | 17 +- test/no_std_use_facet_pass.cpp | 17 +- test/no_std_wstreambuf_fail.cpp | 17 +- test/no_std_wstreambuf_pass.cpp | 17 +- test/no_std_wstring_fail.cpp | 17 +- test/no_std_wstring_pass.cpp | 17 +- test/no_stdc_namespace_fail.cpp | 17 +- test/no_stdc_namespace_pass.cpp | 17 +- test/no_swprintf_fail.cpp | 17 +- test/no_swprintf_pass.cpp | 17 +- test/no_template_template_fail.cpp | 17 +- test/no_template_template_pass.cpp | 17 +- test/no_using_breaks_adl_fail.cpp | 17 +- test/no_using_breaks_adl_pass.cpp | 17 +- test/no_using_decl_overld_fail.cpp | 17 +- test/no_using_decl_overld_pass.cpp | 17 +- test/no_using_template_fail.cpp | 17 +- test/no_using_template_pass.cpp | 17 +- test/no_void_returns_fail.cpp | 17 +- test/no_void_returns_pass.cpp | 17 +- test/no_wchar_t_fail.cpp | 17 +- test/no_wchar_t_pass.cpp | 17 +- tools/Jamfile | 11 + tools/generate.cpp | 231 +++++ 177 files changed, 2056 insertions(+), 2486 deletions(-) create mode 100644 test/boost_no_is_abstract.ipp create mode 100644 test/no_is_abstract_fail.cpp create mode 100644 test/no_is_abstract_pass.cpp create mode 100644 tools/Jamfile create mode 100644 tools/generate.cpp diff --git a/config.htm b/config.htm index 9a5e03c3..2c0d5164 100644 --- a/config.htm +++ b/config.htm @@ -557,6 +557,14 @@ f(&bar); // should choose #2. whether it is appropriate to explicitly specialize a template on wchar_t if there is already a specialization for other integer types. + + BOOST_NO_IS_ABSTRACT + Compiler + The C++ compiler does not support SFINAE with + abstract types, this is covered by + Core Language DR337, but is not part of the current standard.  + Fortunately most compilers that support SFINAE also support this DR. + BOOST_NO_LIMITS Standard library diff --git a/configure b/configure index 923f0433..16593837 100644 --- a/configure +++ b/configure @@ -2552,8 +2552,8 @@ cat > user.hpp << EOF // define this to disable all config options, // excluding the user config. Use if your -// setup is fully ISO compliant, and has no -// useful extensions, or for autoconf generated +// setup is fully ISO complient, and has no +// useful extentions, or for autoconf generated // setups: #ifndef BOOST_NO_CONFIG # define BOOST_NO_CONFIG diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 531691ef..07c106c6 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -54,6 +54,7 @@ // without it, this needs more investigation: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_IS_ABSTRACT # ifdef NDEBUG // fix broken so that Boost.test works: # include diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 4dc3f608..32cf282c 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -13,11 +13,12 @@ // GNU C++ compiler setup: -# if __GNUC__ == 2 && __GNUC_MINOR__ == 91 +#if __GNUC__ < 3 +# if __GNUC_MINOR__ == 91 // egcs 1.1 won't parse shared_ptr.hpp without this: # define BOOST_NO_AUTO_PTR # endif -# if __GNUC__ == 2 && __GNUC_MINOR__ < 95 +# if __GNUC_MINOR__ < 95 // // Prior to gcc 2.95 member templates only partly // work - define BOOST_MSVC6_MEMBER_TEMPLATES @@ -29,30 +30,35 @@ # endif # endif -# if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +# if __GNUC_MINOR__ < 96 # define BOOST_NO_SFINAE # endif -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 97 +# if __GNUC_MINOR__ <= 97 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_OPERATORS_IN_NAMESPACE # endif -# if __GNUC__ < 3 -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# endif +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +#elif __GNUC__ == 3 + // + // gcc-3.x problems: + // + // Bug specific to gcc 3.1 and 3.2: + // +# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) +# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +# endif +# if __GNUC_MINOR__ < 4 +# define BOOST_NO_IS_ABSTRACT +# endif +#endif #ifndef __EXCEPTIONS # define BOOST_NO_EXCEPTIONS #endif -// -// Bug specific to gcc 3.1 and 3.2: -// -#if (__GNUC__ == 3) && ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) -# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -#endif // // Threading support: Turn this on unconditionally here (except for @@ -84,8 +90,8 @@ # error "Compiler not configured - please reconfigure" #endif // -// last known and checked version is 3.4: -#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 4)) +// last known and checked version is 4.0 (Pre-release): +#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0)) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 32353260..1ce600cc 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -55,6 +55,7 @@ # define BOOST_NO_TEMPLATE_TEMPLATES # define BOOST_NO_SFINAE # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS +# define BOOST_NO_IS_ABSTRACT # if (_MSC_VER > 1200) # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS # endif diff --git a/test/Jamfile b/test/Jamfile index 98a5f6ba..c16b3ab4 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -1,8 +1,8 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Sun Jul 25 11:47:49 GMTDT 2004, -# by libs/config/tools/generate +# This file was automatically generated on Sat Dec 04 10:44:19 2004 +# by libs/config/tools/generate.cpp # Copyright John Maddock. # # If you need to alter build preferences then set them in @@ -17,168 +17,6 @@ run config_test.cpp