Recently I am studying GIL and concept(htp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf)
and encounter a lot of problems.
concept ChannelConcept<typename T> : EqualityComparable<T> {
typename value_type = T; // use channel_traits<T>::value_type to access it
where ChannelValueConcept<value_type>; //tag1
typename reference = T&; // use channel_traits<T>::reference to access it
typename pointer = T*; // use channel_traits<T>::pointer to access it
typename const_reference = const T&; // use channel_traits<T>::const_reference to access it
typename const_pointer = const T*; // use channel_traits<T>::const_pointer to access it
static const bool is_mutable; // use channel_traits<T>::is_mutable to access it
static T min_value(); // use channel_traits<T>::min_value to access it
static T max_value(); // use channel_traits<T>::min_value to access it
};
concept MutableChannelConcept<ChannelConcept T> : Swappable<T>, Assignable<T> {};
concept ChannelValueConcept<ChannelConcept T> : Regular<T> {}; //tag2
My questions about the codes are
1 :
concept ChannelValueConcept<ChannelConcept T> : Regular<T> {};
According to the pdf(If I haven't made any mistakes), "ChannelConcept T" means "T" should be a model
of "ChannelConcept", plus the "Regular<T>" means "T" should be a model of "ChannelConcept T" and
"Regular", do I make any mistakes?Thanks
2 :
tag1 and tag2 looks like some recursive concept?What is that mean?
3 :
According to the suggestion of the pdf, we should use nested concept rather than refinement in these cases?
Thank you very much