title: Resolving ambiguous calls in C++ with namespaces
body: <p>I'm merging a static library (assimp) into an existing project (Spring RTS) where both the library and the project are under regular development. I'm trying to add the library in such a way that I can easily repeat the integration as new releases come out.</p>
  
  <p>Anyway, the issue is that Spring requires the library to perform all maths using the streflop maths library. In practice this means <code>min(x,y)</code> should be replaced with <code>streflop::min(x,y)</code> everywhere it is used (which is a lot, considering the issue applies to all maths functions).</p>
  
  <p>I could do a mass regex replace but I was hoping for something a little more elegant. After some research and testing it seemed that adding <code>using namespace streflop;</code> at the top of each .cpp file would do the trick but it didn't.</p>
  
  <p>The exact error is:</p>
  
  <pre><code>/mnt/work/workspace/spring-patch-git/spring/rts/lib/assimp/code/FixNormalsStep.cpp:147: error: call of overloaded sqrtf(const float&amp;) is ambiguous
  /usr/include/bits/mathcalls.h:157: note: candidates are: float sqrtf(float)
  /mnt/work/workspace/spring-patch-git/spring/rts/lib/streflop/SMath.h:347: note:                 streflop::Simple streflop::sqrtf(streflop::Simple)
  </code></pre>
  
  <p>I thought the whole point of namespaces was to resolve this kind of thing but it doesn't seem to work here. I'm a bit confused by the reference to streflop::Simple as well. Is this a nested namespace and could that be part of the reason it isn't working as expected?</p>