From 663c63641d877b3ed0a200ad97ed4a9041f5fe8e Mon Sep 17 00:00:00 2001 From: jofaber Date: Sun, 9 May 2021 20:05:23 +0200 Subject: [PATCH] added missing includes for concept check --- include/boost/icl/closed_interval.hpp | 17 ++++++++++------- include/boost/icl/left_open_interval.hpp | 20 +++++++++++--------- include/boost/icl/open_interval.hpp | 19 ++++++++++--------- include/boost/icl/right_open_interval.hpp | 17 +++++++++-------- 4 files changed, 40 insertions(+), 33 deletions(-) diff --git a/include/boost/icl/closed_interval.hpp b/include/boost/icl/closed_interval.hpp index 56b8865..d7a3e6f 100644 --- a/include/boost/icl/closed_interval.hpp +++ b/include/boost/icl/closed_interval.hpp @@ -8,15 +8,19 @@ Copyright (c) 2010-2010: Joachim Faulhaber #ifndef BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324 #define BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324 +#include +#include +#include #include #include +#include #include #include namespace boost{namespace icl { -template class closed_interval { @@ -30,8 +34,8 @@ public: //= Construct, copy, destruct //========================================================================== /** Default constructor; yields an empty interval [0,0). */ - closed_interval() - : _lwb(unit_element::value()), _upb(identity_element::value()) + closed_interval() + : _lwb(unit_element::value()), _upb(identity_element::value()) { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); @@ -91,7 +95,7 @@ struct interval_traits< icl::closed_interval > //============================================================================== //= Type traits //============================================================================== -template +template struct interval_bound_type< closed_interval > { typedef interval_bound_type type; @@ -105,14 +109,13 @@ struct type_to_string > { return "[I]<"+ type_to_string::apply() +">"; } }; -template +template struct value_size > { - static std::size_t apply(const icl::closed_interval&) + static std::size_t apply(const icl::closed_interval&) { return 2; } }; }} // namespace icl boost #endif - diff --git a/include/boost/icl/left_open_interval.hpp b/include/boost/icl/left_open_interval.hpp index 0c066ad..3468997 100644 --- a/include/boost/icl/left_open_interval.hpp +++ b/include/boost/icl/left_open_interval.hpp @@ -9,15 +9,18 @@ Copyright (c) 2010-2010: Joachim Faulhaber #define BOOST_ICL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930 #include +#include #include +#include #include +#include #include #include namespace boost{namespace icl { -template class left_open_interval { @@ -31,8 +34,8 @@ public: //= Construct, copy, destruct //========================================================================== /** Default constructor; yields an empty interval (0,0]. */ - left_open_interval() - : _lwb(identity_element::value()), _upb(identity_element::value()) + left_open_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); @@ -46,11 +49,11 @@ public: { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); - // Only for discrete types this ctor creates an interval containing + // Only for discrete types this ctor creates an interval containing // a single element only. BOOST_STATIC_ASSERT((icl::is_discrete::value)); BOOST_ASSERT((numeric_minimum::value > - ::is_less_than(val) )); + ::is_less_than(val) )); } /** Interval from low to up with bounds bounds */ @@ -92,7 +95,7 @@ struct interval_traits< icl::left_open_interval > //============================================================================== //= Type traits //============================================================================== -template +template struct interval_bound_type< left_open_interval > { typedef interval_bound_type type; @@ -106,14 +109,13 @@ struct type_to_string > { return "(I]<"+ type_to_string::apply() +">"; } }; -template +template struct value_size > { - static std::size_t apply(const icl::left_open_interval&) + static std::size_t apply(const icl::left_open_interval&) { return 2; } }; }} // namespace icl boost #endif - diff --git a/include/boost/icl/open_interval.hpp b/include/boost/icl/open_interval.hpp index 026f870..b94f231 100644 --- a/include/boost/icl/open_interval.hpp +++ b/include/boost/icl/open_interval.hpp @@ -9,16 +9,18 @@ Copyright (c) 2010-2010: Joachim Faulhaber #define BOOST_ICL_OPEN_INTERVAL_HPP_JOFA_100930 #include +#include #include #include #include +#include #include #include namespace boost{namespace icl { -template class open_interval { @@ -32,8 +34,8 @@ public: //= Construct, copy, destruct //========================================================================== /** Default constructor; yields an empty interval (0,0). */ - open_interval() - : _lwb(identity_element::value()), _upb(identity_element::value()) + open_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); @@ -47,11 +49,11 @@ public: { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); - // Only for discrete types this ctor creates an interval containing + // Only for discrete types this ctor creates an interval containing // a single element only. BOOST_STATIC_ASSERT((icl::is_discrete::value)); BOOST_ASSERT((numeric_minimum::value > - ::is_less_than(val) )); + ::is_less_than(val) )); } /** Interval from low to up with bounds bounds */ @@ -93,7 +95,7 @@ struct interval_traits< icl::open_interval > //============================================================================== //= Type traits //============================================================================== -template +template struct interval_bound_type< open_interval > { typedef interval_bound_type type; @@ -107,14 +109,13 @@ struct type_to_string > { return "(I)<"+ type_to_string::apply() +">"; } }; -template +template struct value_size > { - static std::size_t apply(const icl::open_interval&) + static std::size_t apply(const icl::open_interval&) { return 2; } }; }} // namespace icl boost #endif - diff --git a/include/boost/icl/right_open_interval.hpp b/include/boost/icl/right_open_interval.hpp index a2c4da5..a1027ce 100644 --- a/include/boost/icl/right_open_interval.hpp +++ b/include/boost/icl/right_open_interval.hpp @@ -9,7 +9,9 @@ Copyright (c) 2010-2010: Joachim Faulhaber #define BOOST_ICL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323 #include +#include #include +#include #include #include #include @@ -18,7 +20,7 @@ Copyright (c) 2010-2010: Joachim Faulhaber namespace boost{namespace icl { -template class right_open_interval { @@ -32,8 +34,8 @@ public: //= Construct, copy, destruct //========================================================================== /** Default constructor; yields an empty interval [0,0). */ - right_open_interval() - : _lwb(identity_element::value()), _upb(identity_element::value()) + right_open_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); @@ -47,7 +49,7 @@ public: { BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); - // Only for discrete types this ctor creates an interval containing + // Only for discrete types this ctor creates an interval containing // a single element only. BOOST_STATIC_ASSERT((icl::is_discrete::value)); } @@ -91,7 +93,7 @@ struct interval_traits< icl::right_open_interval > //============================================================================== //= Type traits //============================================================================== -template +template struct interval_bound_type< right_open_interval > { typedef interval_bound_type type; @@ -105,14 +107,13 @@ struct type_to_string > { return "[I)<"+ type_to_string::apply() +">"; } }; -template +template struct value_size > { - static std::size_t apply(const icl::right_open_interval&) + static std::size_t apply(const icl::right_open_interval&) { return 2; } }; }} // namespace icl boost #endif -