concept:: => concepts:: fixes #865

[SVN r53751]
This commit is contained in:
Dave Abrahams
2009-06-08 14:41:16 +00:00
parent deea7c6a58
commit e234ae22f6
7 changed files with 37 additions and 15 deletions

View File

@@ -250,7 +250,7 @@ bad_error_eg.cpp:8: instantiated from here
boost/concept_check.hpp: In destructor boost::LessThanComparable<TT>::~
LessThanComparable() [with TT = std::complex<float>]:
boost/concept/detail/general.hpp:29: instantiated from static void boost::
concept::requirement<Model>::failed() [with Model = boost::
concepts::requirement<Model>::failed() [with Model = boost::
LessThanComparable<std::complex<float> >]
boost/concept/requires.hpp:30: instantiated from boost::_requires_<void
(*)(boost::LessThanComparable<std::complex<float> >)>

View File

@@ -0,0 +1,16 @@
// Copyright David Abrahams 2009. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
namespace boost
{
namespace concepts {}
# if !defined(BOOST_NO_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
namespace concept = concepts;
# endif
} // namespace boost::concept
#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP

5
include/boost/concept/detail/borland.hpp Executable file → Normal file
View File

@@ -5,8 +5,9 @@
# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
namespace boost { namespace concept {
namespace boost { namespace concepts {
template <class ModelFnPtr>
struct require;
@@ -21,7 +22,7 @@ struct require<void(*)(Model)>
enum \
{ \
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
boost::concept::require<ModelFnPtr>::instantiate \
boost::concepts::require<ModelFnPtr>::instantiate \
}
}} // namespace boost::concept

View File

@@ -5,6 +5,7 @@
# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
@@ -13,7 +14,7 @@
// This implementation works on Comeau and GCC, all the way back to
// 2.95
namespace boost { namespace concept {
namespace boost { namespace concepts {
template <class ModelFn>
struct requirement_;
@@ -48,7 +49,7 @@ struct constraint
template <class Model>
struct requirement_<void(*)(Model)>
: mpl::if_<
concept::not_satisfied<Model>
concepts::not_satisfied<Model>
, constraint<Model>
, requirement<failed ************ Model::************>
>::type
@@ -65,8 +66,8 @@ struct requirement_<void(*)(Model)>
# endif
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
typedef ::boost::concept::detail::instantiate< \
&::boost::concept::requirement_<ModelFnPtr>::failed> \
typedef ::boost::concepts::detail::instantiate< \
&::boost::concepts::requirement_<ModelFnPtr>::failed> \
BOOST_PP_CAT(boost_concept_check,__LINE__)
}}

6
include/boost/concept/detail/has_constraints.hpp Executable file → Normal file
View File

@@ -6,7 +6,9 @@
# include <boost/mpl/bool.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace concept {
# include <boost/concept/detail/backward_compatibility.hpp>
namespace boost { namespace concepts {
namespace detail
{
@@ -43,6 +45,6 @@ struct not_satisfied
typedef mpl::bool_<value> type;
};
}} // namespace boost::concept::detail
}} // namespace boost::concepts::detail
#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP

View File

@@ -5,6 +5,7 @@
# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
@@ -12,7 +13,7 @@
# endif
namespace boost { namespace concept {
namespace boost { namespace concepts {
template <class Model>
@@ -91,7 +92,7 @@ struct require<void(*)(Model)>
enum \
{ \
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
sizeof(::boost::concept::require<ModelFnPtr>) \
sizeof(::boost::concepts::require<ModelFnPtr>) \
}
# else // Not vc-7.1
@@ -104,7 +105,7 @@ require_(void(*)(Model));
enum \
{ \
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
sizeof(::boost::concept::require_((ModelFnPtr)0)) \
sizeof(::boost::concepts::require_((ModelFnPtr)0)) \
}
# endif

7
include/boost/concept/usage.hpp Executable file → Normal file
View File

@@ -6,8 +6,9 @@
# include <boost/concept/assert.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>
namespace boost { namespace concept {
namespace boost { namespace concepts {
# if BOOST_WORKAROUND(__GNUC__, == 2)
@@ -25,13 +26,13 @@ struct usage_requirements
# define BOOST_CONCEPT_USAGE(model) \
model(); /* at least 2.96 and 3.4.3 both need this :( */ \
BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements<model>)); \
BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
~model()
# else
# define BOOST_CONCEPT_USAGE(model) \
BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements<model>)); \
BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
~model()
# endif