From: Matt L. <mat...@gm...> - 2008-03-13 19:51:13
|
I've discovered the first casualty caused by bring tr1 into vcl; it's vcl_swap. The problem is actually caused by the fact that I'm not folding tr1 into std. The function swap is commonly overloaded in std for all the types you might want to swap in a specialized, more efficient way. The multiple definitions of vcl_swap didn't cause a problem before because vcl_swap was always defined to std::swap regardless of argument types. Now there is a new swap function in <tr1/memory> for the shared_ptr type. So vcl wants to define vcl_swap as std::tr1::swap. This is a problem. We can't define the same symbol twice depending on the function arguments. Again, there are several solutions but none that I see are clean and elegant. Suggestions? Thanks, Matt |