⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eb22.c

📁 linux下编程用 编译软件
💻 C
字号:
// { dg-do assemble  }// Ambiguous conversion, three candidates:// builtin == (int, int), and the two user-defined operators// Each one requires a user-defined ICS where another uses builtin conversions,// so none is the best viable function.class MyInt{public:        MyInt(int = 0) {}        operator int() const {return 2;}};bool operator==(const MyInt& a, const int& b)   // { dg-error "" } candidate{        return (int)a == b;}bool operator==(const MyInt& a, const MyInt& b) // { dg-error "" } candidate{        return (int)a == (int)b;}bool f(){  return 3 == MyInt();                          // { dg-error "" } ambiguous}

⌨️ 快捷键说明

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