Closed Selur closed 2 years ago
same here.
c++ -Ilibbm3d.so.p -I. -I.. -I../include -I/usr/include/vapoursynth -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O3 -Wno-unused-local-typedefs -mfpmath=sse -msse2 -fPIC -MD -MQ libbm3d.so.p/source_VBM3D_Final.cpp.o -MF libbm3d.so.p/source_VBM3D_Final.cpp.o.d -o libbm3d.so.p/source_VBM3D_Final.cpp.o -c ../source/VBM3D_Final.cpp
../source/VBM3D_Final.cpp: In member function ‘virtual void VBM3D_Final_Process::CollaborativeFilter(int, const std::vector<float*>&, const std::vector<float*>&, const std::vector<const float*>&, const std::vector<const float*>&, const Pos3PairCode&) const’:
../source/VBM3D_Final.cpp:119:25: error: ‘numeric_limits’ is not a member of ‘std’
119 | L2Wiener = Max(std::numeric_limits<float>::epsilon(), L2Wiener);
| ^~~~~~~~~~~~~~
../source/VBM3D_Final.cpp:119:40: error: expected primary-expression before ‘float’
119 | L2Wiener = Max(std::numeric_limits<float>::epsilon(), L2Wiener);
| ^~~~~
[9/10] Compiling C++ object libbm3d.so.p/source_VBM3D_Base.cpp.o
ninja: build stopped: subcommand failed.
Everything is fine after adding #include <limits>
manually.
Fixed with #28
I installed g++-11 to build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-RIFE-ncnn-Vulkan, sadly now building VapourSynth-BM3D fails..
Judging by https://www.gnu.org/software/gcc/gcc-11/porting_to.html#header-dep-changes 'limits' needs to be included explicitly when compiled with GCC 11. -> would be nice if you could adjust the code accordingly. Thanks!