Monday, October 26, 2015

FeedaMail: Comments for Sutter’s Mill

feedamail.com Comments for Sutter's Mill

Comment on Trip report: Fall 2015 ISO C++ standards meeting by jmckesson

> Modules has reached a milestone: design agreement! This was done by separating "phase 1" and "phase 2" of modules

What are the two phases exactly? Is “phase 1” going to be what Gabriel Dos Reis presented at CppCon2015? Because if we get that, I’m not sure what could happen in “phase 2”. And if “phase 1” doesn’t include all of those elements, I don’t know how useful that phase could be.

> attempting to access the invalid variant causes defined behavior, such as throwing an exception, instead of undefined behavior.

Does this not mean that every function that uses the variant must check its validity? How exactly is that “zero overhead”?

Granted, I don’t care all that much, as long as we have a never-empty variant that can get through the committee…

Read More »

Comment on Trip report: Fall 2015 ISO C++ standards meeting by Herb Sutter

@jmckesson: “Modules phase 1” is essentially Gaby’s approach, and “phase 2” is essentially adding support for exporting macros. As for variant, “zero overhead” means at run time — no extra space consumed, and no extra code executed — compared to writing it (correctly) by hand using a raw union and a discriminant tag.

Read More »

Comment on Trip report: Fall 2015 ISO C++ standards meeting by ZaldronGG

jmckesson, why check it? If the variant invariants’ are not met, chance’s are your function doesn’t know enough to act accordingly, and should just let it throw.

Read More »

Comment on Trip report: Fall 2015 ISO C++ standards meeting by Ilya Popov

Does it mean there will be a separate tag value for “invalid” state internally?

Read More »
 
Delievered to you by Feedamail.
Unsubscribe

No comments:

Post a Comment