gcc/testsuite/g++.dg/cpp0x/constexpr-static12.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | // { dg-final { scan-assembler-not "_ZNSt10unique_ptrC1Ei" } } |
| 3 | |
| 4 | namespace std { |
| 5 | struct unique_ptr { |
| 6 | constexpr unique_ptr(int) : p() { } |
| 7 | ~unique_ptr() { } |
| 8 | void* p; |
| 9 | }; |
| 10 | } |
| 11 | |
| 12 | void f() |
| 13 | { |
| 14 | static std::unique_ptr p(1); |
| 15 | } |
| 16 | |
| 17 | int main() |
| 18 | { |
| 19 | f(); |
| 20 | } |