Does the GotW #101 “solution” actually solve anything?

You are correct; the example seems to be missing an explicit template instantiation. When I try to run the example with a constructor and destructor for widget::impl on MSVC 2010 SP1, I get a linker error for pimpl<widget::impl>::pimpl() and pimpl<widget::impl>::~pimpl(). When I add template class pimpl<widget::impl>;, it links fine. In other words, GotW #101 eliminates … Read more

C++’s most vexing parse again [duplicate]

In a function declaration, arguments of type array decay into pointers to the first element, arguments of type function decay into a function pointer, so the signature would be: widget w( gadget(*)(), doodad(*)() ); That is, a function that takes as the first argument a pointer to a function taking no arguments and returning gadget, … Read more