Ticket #10853: const-cast-from-failure.cpp

File const-cast-from-failure.cpp, 277 bytes (added by Matei David <matei@…>, 8 years ago)
Line 
1struct dont_care { dont_care(...); };
2struct A {};
3struct B { B(const A&) {} };
4
5struct C
6{
7#ifdef USE_TEMPLATE
8 template < typename T > static void f(const T&) {}
9#else
10 static void f(const B&) {}
11#endif
12 static void f(dont_care) {}
13};
14
15int main()
16{
17 C::f(A());
18}