Fixed nothrow declaration and definition to what I think should
be the proper values. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3368 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a9aa5ee181
commit
e4edcddbc5
@ -14,3 +14,4 @@ __pure_virtual()
|
||||
//printf("pure virtual function call");
|
||||
}
|
||||
|
||||
const nothrow_t nothrow = {};
|
||||
|
@ -10,14 +10,18 @@
|
||||
#include <new>
|
||||
#include <stdlib.h>
|
||||
|
||||
// I'm not entirely sure if this is such a great idea or not, but
|
||||
// I can't find the standard definition of nothrow anywhere (in
|
||||
// order to copy it properly here for kernel use), so this will
|
||||
// do for the moment so things compile and I can go to bed. :-)
|
||||
// ToDo: declare and define this thing properly
|
||||
#ifndef nothrow
|
||||
# define nothrow 0
|
||||
#endif
|
||||
/*! Looking through the \c <new> header on my Linux distro
|
||||
(can't seem to find it in the R5 headers...), it looks like
|
||||
the type of \c nothrow_t is just:
|
||||
|
||||
<code>struct nothrow_t {};</code>
|
||||
|
||||
Thus, here I'm just declaring an externed \c nothrow_t var called
|
||||
\c nothrow, and defining it in cpp.cpp to be initialized to \c {}.
|
||||
So far, this seems to work okay.
|
||||
*/
|
||||
extern const nothrow_t nothrow;
|
||||
|
||||
|
||||
// Oh no! C++ in the kernel! Are you nuts?
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user