Boost logo

Boost Users :

From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-01-25 12:47:47


I'm attempting to use Boost.Fusion under Boost.Spirit.

I downloaded the library-only package as I already have boost 1.34.1 (which
includes spirit but not fusion)

However, under boost/spirit/fusion/, the structure of include dir is
different from the includes in the

http://spirit.sourceforge.net/dl_more/fusion_v2/libs/fusion/doc/html/fusion/
quick_start.html

 

rds,

From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Ovanes Markarian
Sent: 24 January 2008 15:52
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Multiple templates singletons

 

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_at_[hidden]> 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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
<http://lists.boost.org/mailman/listinfo.cgi/boost-users>

 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net