When I try to build this code:
// foo.h
namespace foo {
    namespace bar {
        void put();
    }
}
#include "foo.h"
namespace foo {
    namespace {
        template<typename T>
        void put() { }
    }    
    void bar::put() {
        put<int>();
    };
}
foo.cpp: In function ‘void foo::bar::put()’:
foo.cpp: error: expected primary-expression before ‘int’
foo.cpp: error: expected ‘;’ before ‘int’
Clearly, put<int> is using put to refer to bar::put. How can I make it refer to the put<T> in the anonymous namespace?
 
     
    