Boolean in ifdef: is “#ifdef A && B” the same as “#if defined(A) && defined(B)”?

后端 未结 5 403
慢半拍i
慢半拍i 2020-12-13 03:18

In C++, is this:

#ifdef A && B

the same as:

#if defined(A) && defined(B)

?

I was

5条回答
  •  执笔经年
    2020-12-13 03:41

    As of VS2015 none of the above works. The correct directive is:

    #if (MAX && !MIN)
    

    see more here

提交回复
热议问题