overload1.c

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· C语言 代码 · 共 25 行

C
25
字号
// { dg-options "-w" }// PR c++/9420// Bug: We were instantiating B<int> during overload resolution for E<0.// This is wrong; the contents of B<int> are not relevant, since we can't// use its constructors (because we'd already be using a constructor for// C).enum { E };template <typename T> struct A {  static const int a = (E < 0);};template <typename T> class B {  A<int> b;};struct C {  C(B<int>);};int operator<(C, C);A<int> c;

⌨️ 快捷键说明

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