Declaring boost::poor is something that goes as below.
boost::pool<> Obj();
I am curious how you can make a class template that needs no template parameters but only the <> ?
I tried making it as boost::pool does in pool.hpp and poolfwd.hpp.
template<class T>
class Fakepool { }; // pool.hpp
template<class T = int>
class Fakepool; // boost::pool's declaration in poolfwd.hpp
int main()
{
Fakepool<float> a;
Fakepool<> a2; // Can't do this with only <>
}//main()
Thanks in advance!
Is this what you are looking for?
You can also, do this (which I think is what you were thinking). The keyword here is
default template arguments. However, in your example you defined the class before you declared it, which was the problem.