Talk:Enforced immutability: Difference between revisions
Content added Content deleted
(C const: a joke) |
(→C const: a joke: more const, pfff) |
||
Line 1: | Line 1: | ||
== C const: a joke == |
== C const: a joke == |
||
The C <code>const</code> is such a joke. <lang C>void some_func(const int const *a) |
The C <code>const</code> is such a joke. <lang C>void some_func(const int const * const a) |
||
{ |
{ |
||
((int*)a)[0]++; |
((int*)a)[0]++; |
Latest revision as of 15:07, 25 June 2011
C const: a joke
The C const
is such a joke. <lang C>void some_func(const int const * const a)
{
((int*)a)[0]++;
}</lang>Not even a compiler warning! So much for "immutable".