Const initialization issue, looking for solution

Jakob Ovrum jakobovrum at gmail.com
Wed May 29 05:43:44 PDT 2013


On Wednesday, 29 May 2013 at 12:40:39 UTC, Dicebot wrote:
> Why something like this is not usable?
> -----------------------
> int tmp;
> try
> {
>    tmp = ...;
> }
> catch(..)
> {
> }
> const(int) i = tmp;
> -----------------------
> Not really pretty but nothing crazy.

const(int) i = tmp; // fails when the type has mutable 
indirection.


More information about the Digitalmars-d mailing list