JoinedConceptTags.hpp File Reference

Concept tags for (fundamental) types in case the type models several concepts. More...

Go to the source code of this file.


class  OKlib::Concepts::VariablesLiterals_tag< Var_tag, Lit_tag >
 Tags for types which are used as variables and as literals. More...


namespace  OKlib

All components of the OKlibrary.

namespace  OKlib::Concepts

Concept definitions and accompanying generic tests.

Detailed Description

Concept tags for (fundamental) types in case the type models several concepts.

The problem is, that in our library every model M of a concept C needs a concept tag (accessed by OKlib::Concepts::traits::concept_tag<M>::type ) which is derived from OKlib::Concepts::C_tag. Now for example the model M1 := OKlib::Variables::Variables_int of concept Concepts::Variables and the model M2 := OKlib::Literals::Literals_int of concept Concepts::Literals are both just typedefs for the fundamental type int (one of the central design decisions is, for such fundamental models to support also built-in types), and so OKlib::Concepts::traits::concept_tag<M> cannot distinguish between the both. The solution is to provide a tag C1C2 with expresses both concepts (is derived from both concept tags). In order to avoid circular include-statements, the definition of C1C2 cannot be put into the the concept definition files for C1 or C2 (where normally the accompanying tags are found), but is to be defined in this file.

Definition in file JoinedConceptTags.hpp.