#include <iostream> struct A { int v = 3; }; namespace Foo { template <int k=11> int operator+(A const& rhs, A const& lhs) { return rhs.v + lhs.v + k; } } using Foo::operator+; using namespace std; int main() { A a1, a2; cout << a1 + a2 << endl; return EXIT_SUCCESS; }