> Create a named constructor like this:
Or:
template <class T>
std::auto_ptr<T> AutoPtr(T* p)
{ return std::auto_ptr<T>(p); }
Hence:
StringSource(str, true,
AutoPtr(new HexEncoder(
AutoPtr(new ...))));
I vote against it, though. There appears to be no elegant solution.
Introducing such ugliness for people who can't read Readme.txt and whose
problems become obvious the first time they try to run their code... I
really don't see the benefit.
Perhaps the text in Readme.txt is too abstract for people to understand
the first time around? Then adding a couple of examples in that location
should solve the problem.