prog.cpp: In member function ‘manager< <template-parameter-1-1> >::resource_ptr manager< <template-parameter-1-1> >::get_resource(const string&)’:
prog.cpp:38:76: error: there are no arguments to ‘shared_from_this’ that depend on a template parameter, so a declaration of ‘shared_from_this’ must be available [-fpermissive]
prog.cpp:38:76: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/c++/4.7/bits/shared_ptr.h:52:0,
from /usr/include/c++/4.7/memory:87,
from prog.cpp:1:
/usr/include/c++/4.7/bits/shared_ptr_base.h: In instantiation of ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<manager<map_policy> >; _Args = {}; _Tp = manager<map_policy>; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]’:
/usr/include/c++/4.7/bits/shared_ptr.h:317:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<manager<map_policy> >; _Args = {}; _Tp = manager<map_policy>]’
/usr/include/c++/4.7/bits/shared_ptr.h:599:39: required from ‘std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = manager<map_policy>; _Alloc = std::allocator<manager<map_policy> >; _Args = {}]’
/usr/include/c++/4.7/bits/shared_ptr.h:615:42: required from ‘std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = manager<map_policy>; _Args = {}]’
prog.cpp:75:43: required from here
/usr/include/c++/4.7/bits/shared_ptr_base.h:1003:4: error: ‘std::enable_shared_from_this<manager<map_policy> >’ is an inaccessible base of ‘manager<map_policy>’