4 ms·
The last time I used C++20 features (modules) I caused a segfault in GCC. This was in December, iirc it was GCC 11.
by duped 5y ago
The last time I used C++20 features (modules) I caused a segfault in GCC. This was in December, iirc it was GCC 11.
- pjmlp 5y agoRight now VC++ is the only viable option for C++20 modules, and even it isn't without warts.
- tialaramex 5y agoIt is kind of crazy that JTC1 is OK with producing entirely imaginary documents. Do you think the two standards bodies know that the product of WG21 is just pieces of paper with no idea whether they can be or will be implemented? Or is this all far above what anybody senior at ISO or the IEC understands because they aren't programmers? Even at W3C you were expected (when I had anything to do with it) to actually build the prototype before you publish the standard, and obviously the IETF's "Rough Consensus and Running Code" speaks to that way of thinking too. I feel like if ISO 216 claimed you can fold a square 1x1 metre piece of paper in half and preserve the proportions, that wouldn't have survived into a published document. Sure you can write that claim, but you cannot actually make that fold, it's surely amazing that the C++ Committee are not subject to the same consideration and yet here we are.
- mhh__ 5y agoThey do reject things based on implementation difficulty too. "Static if considered" rejects it on the basis that the implementations would struggle.
- Kranar 5y agoNot really, it had nothing to do with implementation difficulty and the paper actually states that implementing static if would be fairly easy: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3613.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n361... What the paper says is that static if would make it much harder to perform static analysis of source code, not really because it's hard to implement but because the kind of combinatorial explosion introduced by having non-local bifurcating source code branches to analyze makes analysis incredibly slow. C++ did eventually adopt if constexpr, which does not have this problem since the branches are always local.
- mhh__ 5y agoif constexpr is the static if we have at home. It's rubbish.
- pjmlp 5y agoOn the contrary, what is happening is the hard reality of MIT based compilers when downstream doesn't care about improving upstream language compliance. clang is trailing C++20, since Apple and Google stop caring to be first line contributors. GCC is actually not that far behind VC++. And regarding building prototypes, VC++ modules implementation was the prototype.
- gumby 5y ago> It is kind of crazy that JTC1 is OK with producing entirely imaginary documents. I don’t think they do this much if at all any more having been burned in the past. If anything they are more extreme in the other direction: for every person who complains the standard is moving too quickly there is someone complaining that the committee is moving too slowly (“what? Still no networking?”) They aren’t as hardcore as the IETF’s two independent implementations but I’m not sure how faithful the IETF ever was to that (perhaps apocryphal) criterion anyway.