[cfe-commits] r148348 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/Sema.cpp lib/Sema/SemaDeclCXX.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Wed Jan 18 03:55:10 PST 2012


On 18.01.2012, at 12:09, Eli Friedman wrote:

> Actually, thinking about it a bit more, we could easily stop people
> from accidentally writing anything that leads to undefined behavior by
> making std::initializer_list's destructor private.  I wonder why it
> wasn't specified that way.

Then I couldn't use std::initializer_list as a function parameter type. Private destructors force heap-allocation without external freeing; nothing else is possible with such types.

Sebastian



More information about the cfe-commits mailing list