////////////////////////////////////////
namespace foo // "boost"
{
template<class T1, class T2>
void swap(T1&, T2&)
{
// Trigger a compile error.
int staticAssert[sizeof(T1)!=sizeof(T2)] = {1};
}
}
namespace bar // "std"
{
template<class T>
void swap(T&, T&)
{
return; // okay.
}
class string {};
}
int main()
{
bar::string a1[42];
bar::string a2[42];
using foo::swap;
swap(a1, a2);
}
////////////////////////////////////////