2004-11-06 22:29:57 +00:00
|
|
|
// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
|
|
|
|
|
2003-08-29 00:29:55 +00:00
|
|
|
// Default placement versions of operator new.
|
2007-04-16 21:18:56 +00:00
|
|
|
#include <new>
|
|
|
|
|
|
|
|
void* operator new(size_t, void* __p) throw();
|
2003-08-29 00:29:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
template<typename _CharT>
|
2005-04-21 23:48:37 +00:00
|
|
|
struct stdio_filebuf
|
2003-08-29 00:29:55 +00:00
|
|
|
{ stdio_filebuf();
|
2005-04-21 23:48:37 +00:00
|
|
|
|
2003-08-29 00:29:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern stdio_filebuf<char> buf_cout;
|
|
|
|
|
|
|
|
void foo() {
|
|
|
|
// Create stream buffers for the standard streams and use
|
|
|
|
// those buffers without destroying and recreating the
|
|
|
|
// streams.
|
|
|
|
new (&buf_cout) stdio_filebuf<char>();
|
|
|
|
|
|
|
|
}
|