
On Wed, Jul 4, 2012 at 1:23 PM, Nathan Ridge <zeratul976@hotmail.com> wrote:
If C++11 had local class templates, then you could write a macro that emits the declaration of a local class template with a bool template parameter with a static function that performs the assert (for the true specialization) or does nothing (for the false specialization), and then call it with the condition as the template parameter.
Yeah, that'd be cool and we could implement polimorphic local functions. The same goes for lambas -- it'd be nice to have templated lambdas.
Are there any compilers that support local class templates and/or local classes with template members as an extension? I have repeatedly found
AFAIK, no :(
myself wishing for them, and they seem like a logical next step after adding support for local classes as template parameters in C++11.
--Lorenzo