"Anthony Williams" wrote:
> On Wednesday, 18 July 2012 23:07:01 UTC+1, Venkat wrote:
>> Hello All,
>>
>> Though it seems a simple question, I couldn't find any
>> authoritative
>> explanation, so asking.
You may find it in section 1.2 A Keyword Distinction of Stanley
Lippman's Inside the C++ Object Model. Moreover, the primary focus is
not on the technicalities, but rather on both historical and
philosophical perspectives. Oddly enough, these, combined with the
first-(implementor's)-hand account, gives a good sense of when and
where to use or not to use the struct keyword in the context of C++.
Another great asset is the enjoyable and witty narrative. Have a nice
reading!
It was a pleasure to read your article on that (ever emerging) topic.
Concise yet (technically) complete, clear and readable, well
structured in form and content. I hope the book of yours holds such
qualities as well.
Nevertheless, let me recommend two additions for the sake of
completeness, namely the nested class member and the (explicit)
template specialization/instantiation issues.
First of all, it would be nice if the nested class member is treated
and exemplified on equal terms with the class data member and class
member function/operator.
Secondly, the template section could be extended to encompass not all
the possible combinations of 'ordinary'/template class/struct
containing member templates and nontemplate members (for both nested
classes and member functions), which would be highly redundant, but to
depict the situation concerning the downstream refinement of a
template entity.
The sequence in question is: (class/struct template declaration ->)
class/struct template definition (primary template) -> partial/full
specializations -> explicit instantiation of a template class/struct
(of primary templates/partial specializations). (Please, refer to my
post-reply to Seungbeom Kim's 'What is template specialization?' to
this newsgroup (January 12th) for details.)
Are the class/struct keywords interchangeable in this sequence from
the viewpoint of the Standard's prescription not of the compilers'
tolerance? The answer may seem obvious...
Regards,
Yordan
--