Richard Smith | d28ac5b | 2014-03-22 23:33:22 +0000 | [diff] [blame] | 1 | #include "cxx-irgen-top.h" |
| 2 | |
| 3 | S<int> s; |
Richard Smith | 04d05b5 | 2014-03-23 00:27:18 +0000 | [diff] [blame] | 4 | |
| 5 | inline int instantiate_min() { |
| 6 | return min(1, 2); |
| 7 | } |
Richard Smith | cd45dbc | 2014-04-19 03:48:30 +0000 | [diff] [blame] | 8 | |
| 9 | inline int instantiate_CtorInit(CtorInit<int> i = CtorInit<int>()) { |
| 10 | return i.a; |
| 11 | } |
Richard Smith | 6de7a24 | 2014-07-31 23:46:44 +0000 | [diff] [blame] | 12 | |
| 13 | namespace ImplicitSpecialMembers { |
| 14 | inline void create_left() { |
| 15 | // Trigger declaration, but not definition, of special members. |
| 16 | B b(0); C c(0); D d(0); |
| 17 | // Trigger definition of copy constructor. |
| 18 | C c2(c); D d2(d); |
| 19 | } |
| 20 | } |
Richard Smith | 4d23579 | 2014-08-07 18:53:08 +0000 | [diff] [blame] | 21 | |
| 22 | namespace OperatorDeleteLookup { |
| 23 | // Trigger definition of A::~A() and lookup of operator delete. |
| 24 | // Likewise for B<int>::~B(). |
| 25 | inline void f() { A a; B<int> b; } |
| 26 | } |