member5.c

来自「linux下编程用 编译软件」· C语言 代码 · 共 33 行

C
33
字号
// { dg-do compile }// Contributed by: <fasbjx at free dot fr>// PR c++/14389: Disambiguate overloaded member templates which differ only//  in the template argument list.namespace N1 {struct S {     template< typename B, typename A > void foo();     template< typename A >             void foo(); };  template< typename A >             void S::foo() {} template< typename B, typename A > void S::foo() {}  template void S::foo<void> (); template void S::foo<void,void> (); }namespace N2 {struct S {   template< typename _A > void foo();   template< int _i >      void foo(); }; template< typename _A > void S::foo() {} template void S::foo< 0 >();    // { dg-error "no definition available|instantiated from here" }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?