Created
November 10, 2010 14:50
-
-
Save qsorix/670940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
namespace ns1 { | |
template <typename T, typename U> | |
int operator+(const T&, const U&) | |
{ | |
std::cout << "ns1::operator+" << std::endl; | |
return 1; | |
} | |
namespace ns1_1 { | |
using ns1::operator+; | |
struct foo { | |
}; | |
} | |
namespace ns1_2 { | |
struct bar {}; | |
bar operator+(const bar&, const bar&) | |
{ | |
std::cout << "ns1_2::operator+" << std::endl; | |
} | |
int function() | |
{ | |
ns1_1::foo a, b; | |
a + b; | |
} | |
} | |
} | |
int main() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment