C++ PR12 (template stack) fix