Visual Studio 2008 to Visual Studio 11 Beta std::bad_alloc Constructor Goes Private
-
13 Mart 2012 Salı 18:24
std::bad_alloc's constructors have changed from Visual Studio 2008 to Visual Studio 11 beta. The constructor that accepts a user-supplied message has moved from public to private. Is this a deliberate change? Was I just using the library wrong in 2008? Or should the constructor really be public?
Tüm Yanıtlar
-
13 Mart 2012 Salı 18:42
On 3/13/2012 2:24 PM, TheArtTrooper wrote:
std::bad_alloc's constructors have changed from Visual Studio 2008 to
Visual Studio 11 beta. The constructor that accepts a user-supplied
message has moved from public to private. Is this a deliberate
change? Was I just using the library wrong in 2008? Or should the
constructor really be public?The C++ standard mandates a default constructor and a copy constructor for bad_alloc. Any other constructor is an implementation-specific extension.
Igor Tandetnik
-
13 Mart 2012 Salı 20:31Thanks for the quick answer Igor.