Menu

#50 Compilation fails with GCC11/std=c++17, duplicate "clamp" definition

v1.0 (example)
closed-accepted
nobody
None
5
2021-08-08
2021-08-08
No

GCC 11 defaults to C++17, and thus provides std::clamp(T, T, T).

fileformat/pfsinyuv.cpp (re)defines clamp in the global namespace.

As pfsinyuv.cpp has a "using namespace std" from pfsutils.cpp, both definitions clash.

Discussion

  • Rafal Mantiuk

    Rafal Mantiuk - 2021-08-08

    Patched applied and pushed to the master branch. Thanks for the fix.

     
  • Rafal Mantiuk

    Rafal Mantiuk - 2021-08-08
    • status: open --> closed-accepted
     

Log in to post a comment.