|
|
|
|
|
by trinovantes
1838 days ago
|
|
I wish more languages have the concept of "object/memory freezing" especially at runtime, similar to runtime assertion checks, but without using 3rd party compiler plugins to instrument my code. C++'s insane "const * const" syntax makes it hard to conceptualize when I just want "create object, do bunch of non trivial stuff, freeze object forever" |
|
what is insane about const * const? (although a const unique_ptr<T> is obiously better and propagate_const ist nice) For you usecase if "create object, do bunch of non trivial stuff, freeze object forever" you propably want a IIFE.