- lib:
boost/libs/concept_check
- repo:
boostorg/concept_check
- commit:
df4ced9a
, 2017-04-04
Header <boost/concept_check.hpp>
Header <boost/concept/assert.hpp>
- Macro
BOOST_CONCEPT_ASSERT((Model))
. - Force instantiation of
Model::~Model()
.
Header <boost/concept/requires.hpp>
- Macro
BOOST_CONCEPT_REQUIRES(((Model))((Model2)),(type))
- Asserts on every Model, then results in the
type
. - Can be used as function return type, similar to
enable_if
.
Header <boost/concept/usage.hpp>
- Macro
BOOST_CONCEPT_USAGE(Model)
, used in concept class with class name asModel
. - Expands to assertion of instantiation of destructor, then the head of destructor
~Model()
. - A concept is a template class
- Inherit other concept classes as
requires
(refinement) - Add
BOOST_CONCEPT_ASSERT
as needed. - Add a
BOOST_CONCEPT_USAGE(Concept)
, or define destructor, to assert for valid expressions.
- Inherit other concept classes as
Header <boost/concept_check.hpp>
Integer
,SignedInteger
,UnsignedInteger
DefaultConstructible
,Assignable
,CopyConstructible
,SGIAssignable
,Convertible
EqualityComparable
,LessThanComparable
,Comparable
EqualOp
,NotEqualOp
,LessThanOp
,LessEqualOp
,GreaterThanOp
,GreaterEqualOp
PlusOp
,TimesOp
,DivideOp
,SubtractOp
,ModOp
Generator
,UnaryFunction
,BinaryFunction
,UnaryPredicate
,[Const_]BinaryPredicate
AdaptableGenerator
,AdaptableUnaryFunction
,AdaptableBinaryFunction
,AdaptablePredicate
,AdaptableBinaryPredicate
InputIterator
,OutputIterator
,[Mutable_]ForwardIterator
,[Mutable_]BidirectionalIterator
,[Mutable_]RandomAccessIterator
[Mutable_]Container
,[Mutable_]ForwardContainer
,[Mutable_]ReversibleContainer
,[Mutable_]RandomAccessContainer
Sequence
,FrontInsertionSequence
,BackInsertionSequence
AssociativeContainer
,UniqueAssociativeContainer
,MultipleAssociativeContainer
,SimpleAssociativeContainer
,PairAssociativeContainer
,SortedAssociativeContainer
Collection
Archetypes are used to check agains generic code obey its documented concept requirements.
Naming convention is concept_name_archetype
.
null_archetype
andboolean_archetype
default_constructible
,assignable
,copy_constructible
,sgi_assignable
,convertible_to
,convertible_from
equality_comparable
,equality_comparable2_{first|second}
,less_than_comparable
,comparable
equal_op_{first|second}
,not_equal_op_{first|second}
,less_than_op_{first|second}
,less_equal_op_{first|second}
,greater_than_op_{first|second}
,greater_equal_op_{first|second}
addable
,subtractable
,multipliable
,dividable
,modable
plus_op_{first|second}
,time_op_{first|second}
,divide_op_{first|second}
,subtract_op_{first|second}
,mod_op_{first|second}
generator
,void_generator
,unary_function
,binary_function
,unary_predicate
,binary_predicate
input_iterator
,input_iterator_archetype_no_proxy
,output_iterator
,input_output_iterator
[mutable_]forward_iterator
,[mutable_]bidirectional_iterator
,[mutable_]random_access_itertor
<boost/config.hpp>
,<boost/detail/workaround.hpp>
<boost/utility/enable_if.hpp>
<boost/type_traits/is_same.hpp>
,<boost/type_traits/is_void.hpp>
<boost/type_traits/conversion_traits.hpp>
<boost/mpl/assert.hpp>
<boost/mpl/identity.hpp>
<boost/mpl/bool.hpp>
<boost/preprocessor/seq/for_each.hpp>
<boost/preprocessor/seq/for_each_i.hpp>
<boost/preprocessor/seq/enum.hpp>
<boost/preprocessor/cat.hpp>
<boost/preprocessor/comma_if.hpp>
- Proposals:
- N4361 - Concept Lite TS