Tobias,

Thanks for your corrections. It is a bit difficult to speak by means of "C++-Standard Language" ;)


With Kind Regards,
Ovanes

P.S.
---- OFFTOPIC
Could you take a look at my previous posting regarding singleton destruction. May be you have overseen it.
---- END


On Jan 24, 2008 3:26 PM, Tobias Schwinger <tschwinger@isonews2.com> wrote:
  [...]
The wording is a bit ambiguous: A pointer to an /incomplete type/ is in
fact OK (using standard terminology), but 'TreeImplBase' is a /template
id/ which is not a type at all.

As Ovanes pointed out that construct is illegal, however (except inside
a definition of 'TreeImplBase' where it's the /injected class name/).

/Specializing/ a template with template arguments yields a type. Using
(whatever) member of this type's interface causes the template to be
implicitly (possibly partially) /instantiated/. It's most important to
realize that specializing a template does not cause the template to be
instantiated automatically.

Note that "template specialization" has a context-dependent meaning, as
it can either refer to a type or of a class (template) definition of a
variant implementation of the template:

    // /primary template/
    template< typename T > struct A { ... };

    // definition of the (full) specialization A<int>
    template< > struct A<int> { ... };

    // definition of a partial specialization
    template< typename T > struct A< B<T> >
    {
        typedef A self; // /injected class name/ is a type
    };

    // X and Y are specializations (not instantiations)!
    typedef A< B<int> > X;
    typedef A< long > Y;

    int main()
    {
       X x; // instantiation of the 'B<int>'-specialization of A
       // at this point

    // ...

OK, that's about template terminology in five minutes :-).


Regards,
Tobias

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users