D const design rationale

eao197 eao197 at intervale.ru
Thu Jun 21 00:37:13 PDT 2007


On Thu, 21 Jun 2007 10:36:12 +0400, Walter Bright  
<newshound1 at digitalmars.com> wrote:

> http://www.digitalmars.com/d/const.html

Thanks for the article!

Small typo in C++ example: const_cast needs type in angle brackets:

void foo(const int *p)
{
     int *q = const_cast< int * >(p);
     *q = 4;
}

-- 
Regards,
Yauheni Akhotnikau



More information about the Digitalmars-d mailing list