Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new (a, b, c) TypeId;
- // the function called by the compiler has to have the following signature:
- operator new(std::size_t size, TypeOfA a, TypeOfB b, TypeOf C c);
- new (std::nothrow) TypeId;
- // the following function is defined implicitly in the standard library
- void * operator(std::size_t size, void * ptr) throw() {
- return ptr;
- }
- new (a, b, c) TypeId;
- int * a = new int;
- => void * operator new(std::size_t size) throw(std::bad_alloc);
- delete a;
- => void operator delete(void * ptr) throw();
- TypeWhosCtorThrows * a = new ("argument") TypeWhosCtorThrows;
- => void * operator new(std::size_t size, char const* arg1) throw(std::bad_alloc);
- => void operator delete(void * ptr, char const* arg1) throw();
- TypeWhosCtorDoesntThrow * a = new ("argument") TypeWhosCtorDoesntThrow;
- => void * operator new(std::size_t size, char const* arg1) throw(std::bad_alloc);
- delete a;
- => void operator delete(void * ptr) throw();
- new (possible_arguments) TypeId[N];
Add Comment
Please, Sign In to add comment