std::min is being redefined, but how?
<p>Do streflop or boost libraries change the definition of std::min?</p>

<p>I have a project that compiles fine with g++/make UNTIL I merge it with the CMake build of another project (using add_directory). Suddenly I get:</p>

<pre><code>no matching function for call to min(double&amp;,float)
</code></pre>

<p>The line number it claims the error is on is wrong (it's pointing to the last line of the source file) but I'm going to assume the relevant code is this:</p>

<pre><code>first = std::min (first, key.mTime);
</code></pre>

<p>Where first is declared as a double.</p>

<p>The 'parent' project (Spring RTS) uses boost and streflop but even after replacing all includes for <code>&lt;math.h&gt;</code> with <code>"streflop_cond.h"</code> in the child project (assimp) the problem remains.</p>

<p>Maybe some compiler flags are responsible, I'm not sure. An theories would be appreciated. The source for both projects are available online.</p>

<p>I've spent nearly 7 hours on this now and I don't seem any closer to a solution.</p>

<p>The full error and build flags is:</p>

<pre><code>    [ 61%] Building CXX object rts/lib/assimp/code/CMakeFiles/assimp.dir/ScenePreprocessor.cpp.o
cd /mnt/work/workspace/spring-patch-git/linux/build/rts/lib/assimp/code &amp;&amp; /usr/bin/g++   -Dassimp_EXPORTS -DSYNCCHECK -DNO_AVI -DSPRING_DATADIR=\"/usr/local/share/games/spring\" -DSTREFLOP_SSE -DASSIMP_BUILD_DLL_EXPORT -msse -mfpmath=sse -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pthread  -O0 -Wall -Wno-sign-compare -DDEBUG -D_DEBUG -DNO_CATCH_EXCEPTIONS -gstabs -fPIC -I/mnt/work/workspace/spring-patch-git/spring/rts/System -I/mnt/work/workspace/spring-patch-git/spring/rts/lib/lua/include -I/mnt/work/workspace/spring-patch-git/spring/rts/lib/streflop -I/usr/include/SDL -I/usr/include/boost-1_39 -I/mnt/work/workspace/spring-patch-git/spring/rts -I/usr/include/AL -I/usr/include/freetype2 -I/mnt/work/workspace/spring-patch-git/spring/rts/lib/assimp/include -I/mnt/work/workspace/spring-patch-git/spring/rts/lib/assimp/../streflop   -o CMakeFiles/assimp.dir/ScenePreprocessor.cpp.o -c /mnt/work/workspace/spring-patch-git/spring/rts/lib/assimp/code/ScenePreprocessor.cpp
/mnt/work/workspace/spring-patch-git/spring/rts/lib/assimp/code/ScenePreprocessor.cpp: In member function void Assimp::ScenePreprocessor::ProcessAnimation(aiAnimation*):
/mnt/work/workspace/spring-patch-git/spring/rts/lib/assimp/code/ScenePreprocessor.cpp:280: error: no matching function for call to min(double&amp;, float)
make[2]: *** [rts/lib/assimp/code/CMakeFiles/assimp.dir/ScenePreprocessor.cpp.o] Error 1
</code></pre>
