macro and member function conflict

前端 未结 5 554
名媛妹妹
名媛妹妹 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:26

    Dewfy, The problem with that solution is if you nee to use the macro afteryards.

    I even tried the defining NOMINMAX but it didn't work.

    The best solution i found was the one from Johannes Schaub: (std::numeric_limits::min)()

提交回复
热议问题