tq02.cpp

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C++ 代码 · 共 25 行

CPP
25
字号
#include "dump.h"
struct A {
    int operator + ( int );
    int operator + ( int ) const;
    int operator + ( int ) volatile;
    int operator + ( int ) const volatile;
};
int A::operator + ( int ) { GOOD; return __LINE__; };
int A::operator + ( int ) const { GOOD; return __LINE__; };
int A::operator + ( int ) volatile { GOOD; return __LINE__; };
int A::operator + ( int ) const volatile { GOOD; return __LINE__; };
void f( A &a, A const &b, A volatile &c, A const volatile &d ) {
    a + 1;
    b + 2;
    c + 3;
    d + 4;
}
int main( void ) {
    A a;
    f( a, a, a, a );
    CHECK_GOOD( 38 );
    return errors != 0;
}

⌨️ 快捷键说明

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