// { dg-do compile } // Copyright (C) 2004 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 14 Dec 2004 // PR 18949. Forgot to convert from reference. // Origin: Volker Reichelt struct A { void foo(); }; template void bar(A& a) { const_cast(a).foo(); static_cast(a).foo(); reinterpret_cast(a).foo(); ((A&)a).foo(); } template void bar<0>(A& a);