Actually, I can make it a library solution right now. Just provide a template, which takes a symbolic representation of constness and a type and constructs the appropriately const type. And a template, which extracts the const-ness of a type. It's gonna look ugly, but it will work.
On Tue, Nov 8, 2011 at 9:02 PM, so <[email protected]> wrote: > On Tue, 08 Nov 2011 18:56:59 +0200, Gor Gyolchanyan > <[email protected]> wrote: > >> Unless you write a template constraint, this will force you to use the >> same type, instead of the same storage class. >> >> On Tue, Nov 8, 2011 at 8:42 PM, so <[email protected]> wrote: >>> >>> On Tue, 08 Nov 2011 16:39:35 +0200, so <[email protected]> wrote: >>> >>>> auto fun(return(type) a, ...) >>>> return(T) fun(return(S) a, ...) >>> >>> Damn, nobody likes it, and i was expecting at least a nobel prize on >>> math. >>> > > return(T) fun(return(S) a, ...) > > Functions just like inout right now, and with: > > auto fun(return(type) a, ...) > > I meant to suggest if not said otherwise (as in the case above) we can just > go return what it was passed. > (I am not sure, probably inout already does this too) >
