sizeof in preprocessor command doesn't compile with error C1017

后端 未结 4 615
迷失自我
迷失自我 2021-01-29 16:46

I want to use preprocessor command to control code executive path. Because in this way can save runtime time.

#if (sizeof(T)==1 doesn\'t comple with error:

4条回答
  •  时光说笑
    2021-01-29 17:00

    btw Borland C++ and Watcom C++ support sizeof() in preprocessor expressions, I do not know whether gcc support it.

提交回复
热议问题