macro and member function conflict

前端 未结 5 542
名媛妹妹
名媛妹妹 2020-12-05 18:05

I have problem that,std::numeric_limits::min() conflicts with the \"min\" macro defined in \"windef.h\". Is there any way to resolve this conflict without undefine the \"mi

5条回答
  •  独厮守ぢ
    2020-12-05 18:22

    Yep, I've meet the same problem. I found only one solution:

    #ifdef min
    #undef min
    #endif //min
    

    Place it right after includes have done.

提交回复
热议问题