Boost logo

Boost Users :

Subject: [Boost-users] [Proto] Default-constructing a proto::terminal
From: Roland Bock (rbock_at_[hidden])
Date: 2010-09-16 09:09:02


Hi,

I have a class which has boost::proto::terminal members like this:

    struct _table
    {
       struct id
       {
          id(); // default constructible
          /*...*/
       };
       boost::proto::terminal<id> id_terminal;
    };

    _table table;

Will table.id_terminal be constructed correctly?

I am asking because in Proto's documentation terminals are always
instantiated with curly braces, e.g.:

typedef proto::terminal<int>::type int_;
int_ i = {42}, j = {24};

template<int I>
struct placeholder
{};

proto::terminal<placeholder<0> >::type const _1 = {{}};
proto::terminal<placeholder<1> >::type const _2 = {{}};

Thanks and regards,

Roland


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