#include template class Wrapper; template class PtrVector { template friend PtrVector Wrapper::begin(Type1 const &t1, Type2 const &t2); void fun() {} double d_d; }; using namespace std; int main(int argc, char **argv) { }