this is a follow up to this question
when using nothrow allocators the code compile with clang but not with gcc
#include <new>
class X {
   public:
      X() noexcept { }    
   private:
      static void operator delete(void*) { }
};
int main() { 
    X* x = new(std::nothrow) X{}; 
}
which compiler is right ?
 
Aucun commentaire:
Enregistrer un commentaire