Boost logo

Boost :

Subject: Re: [boost] [c++11] compile_if utility
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-07-04 15:14:29


On Wed, Jul 4, 2012 at 1:23 PM, Nathan Ridge <zeratul976_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk