Do you have any C++ question? I will try to answer it.
-
-
Replying to @hankadusikova
Is there an upcoming way to properly promise compilers that memory will not change within some region? Const doesn't do the trick in most situations. What is the state of compile time introspection? Any chance to see that in the next revision?
1 reply 0 retweets 1 like -
Replying to @AndresFreundTec
You need to elaborate more about the const not doing the trick. Introspection is on its track and all stakeholders are hoping for 23.
2 replies 0 retweets 2 likes -
Replying to @hankadusikova
Well, const doesn't guarantee that there's no other non-const pointers that could also modify the memory. It's also legal to cast const away if the underlying memory wasn't constant. So it doesn't really help the compiler to recognize the compiler to realize memory won't change.
2 replies 0 retweets 1 like -
Replying to @AndresFreundTec @hankadusikova
What if you just take the object you 'don't want to change' by value? The compiler is still allowed to optimize the copy away, but you get the guarantee that the original is not changed...
1 reply 0 retweets 0 likes -
Replying to @janwilmans @hankadusikova
They're too complex / large, and the objects often contain pointers themselves.
1 reply 0 retweets 0 likes -
Replying to @AndresFreundTec @hankadusikova
Can you share more details on the use case? What large structures containing pointers should be immutable?
2 replies 0 retweets 0 likes
Shared memory state in a database, but only in regions holding locks. Including the database buffer cache. Query execution plans (typically represented as trees). Query execution row holders (they are modified in-place in some places, but in many places are not).
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.