Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- template <class A, class B> struct Foo {
- template <class Z>
- void operator-(Z z) const { std::cout << "Member\n"; }
- };
- template <class A, class Z> void operator- (const Foo<A, int>& foo, Z z) {
- std::cout << "Standalone\n";
- }
- int main () {
- Foo<double, int> x;
- x-2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement