none
Visual Studio 2008 to Visual Studio 11 Beta std::bad_alloc Constructor Goes Private

    Discussão Geral

  • 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?

    terça-feira, 13 de março de 2012 18:24

Todas as Respostas

  • 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

    terça-feira, 13 de março de 2012 18:42
  • Thanks for the quick answer Igor.
    terça-feira, 13 de março de 2012 20:31