[cfe-commits] [patch] decltype in mem-initializers

David Blaikie dblaikie at gmail.com
Wed Dec 7 22:48:35 PST 2011


Another small/simple patch to add support for decltype in
mem-initializers such as this:

struct Base { Base(int); };
struct Derived : Base {
  Derived() : decltype(Base(1))(3) { // initializing base
  }
  Derived(int) : decltype(Derived())() { // forwarding ctor
  }
};

Thanks again,
- David

[After this & the other patch I have out I should only have pseudo
destructors left before we've finished N3031 (minor niggling leftover
is that I need to go back & preclude the use of decltype in
nested-name-specifiers that are used in declarator-ids, strangely -
8.3\1)]



More information about the cfe-commits mailing list