It appears that the itater adapter reverse_title
defines its nested types in a special form From, which makes it public with std :: iterator
iterator_category
, value_type
, inter_type
, indicator
and context
. Except for iterator_category
and value_type
, all of these are clearly edited again in the definition of the typed
'class.
24.5.1.1 Class Template Reverse_Eterator [reverse. Etter]
Namespace CSS {template & lt; Square iterator & gt; Classic reverse_title: Public Iterator & Lt; Tippanam Iterator_trate & lieutenant; Iterator & gt; :: Iterator_grid, Typnim Iterter_tratt & lt; Iterator & gt; :: value_type, typename iterator_traits & lt; Iterator & gt ;: inter_type, typename iterator_traits & lt; Iterator & gt; :: indicator, typename iterator_traits & lt; Iterator & gt; :: References & gt; ; {Public: Type Iter Eater_type; Typedef typename iterator_traits & lt; Iterator & gt; :: inter_type inter_type; Typipip typename iterator_traits & lt; Iterator & gt; :: Reference Reference; Typedef typename iterator_traits & lt; Iterator & gt; :: Pointer Pointer; // ... the rest of the class};
Question : Why the definition of duplication? Is it only for the purposes of the exhibition, or is it more? And iterator_category
and value_type
for a while For, they are moving away from using the std :: iterator
as the base code, and to specify that each interseer should define the correct type of names.
When they specify the base class in the standard, then in the same way, the implementation of the class prevents the implementation, even if the only real intention was to specify that the iterator should define some names Required. Specifically, you can define is_base_of
that the
It (me) as if it is in the process of walking with at least one accidental halfway point (more or less accidentally) for which std :: iterator
Is used as a base class, and should be defined in the std :: reverse_iterator
by specifying the names (and also, along with other other iterators).
In the history of those who care, this includes:
They were provided for almost the same reason std :: iterator
(i.e., only to provide some typographs in one derived class) so that the reason behind removing them is as the base class.
c ++ कोडर्स के लिए प्रोग्रामिंग उदाहरण
ReplyDeleteबहुभुज भरने एल्गोरिथ्म नमूना कार्यक्रम को लागू करें