Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2006-11-03 03:51:25

Roland Schwarz <roland.schwarz_at_[hidden]> writes:

> Anthony Williams wrote:
>> If the constexpr proposal gets accepted into the C++ Standard, we won't have
>> to worry about this in the future --- constructors that just use constant
>> expressions can be tagged "constexpr", and used for static initialization.
> What does this mean, can you please illustrate it with an example?

struct A
    constexpr A(int i_):

    int i;
    int j;

static A a(6); // static initialization, same as {6,0}, but with a constructor.


Anthony Williams
Software Developer
Just Software Solutions Ltd

Boost list run by bdawes at, gregod at, cpdaniel at, john at