166. WG21 September 2023 mailing, Contracts, Modules, Cppfront
With Gianluca Delfino, Vladimír Arnošt, Sergey Ishin, Damask Talary-Brown et al.
Media
Video
Podcast
Powered by RedCircle
Feedback
Roi Barkan commented on Episode 165:
I think the “erroneous behavior” proposal is meant to allow the standard to specify situations where it is allowed to either fail on, or to allow - but be deterministic if it allows the situation.
To try and clarify, here are various situations the standard describes:
- ILL-Formed: compilation must fail
- Undefined Behavior: compilation must succeed (compiler might warn), but code can do ANYTHING
- ILL-Formed-No-Diagnostics-Required (IFNDR) - compilation is allowed to fail or generate code that can do ANYTHING
- Erroneous Behavior - compilation is allowed to fail, or generate deterministic (not explode) behavior
WG21 mailing, September 2023
Nothing on Reflection or Pattern Matching.
Paper: Vector API for random number generation
std::array<std::uint_fast32_t, arrayLength> intArray;
std::mt19937 g(777);
std::ranges::generate_random(intArray, g);
Paper: A natural syntax for Contracts
P2961R0 by Jens Maurer and Timur Doumler
float sqrt(float x)
pre (x >= 0);
Paper: A Principled Approach to Open Design Questions for Contracts
P2932R0 by Joshua Berne
The Contracts MVP being developed by SG211 is progressing smoothly toward a complete proposal according to the agreed-upon schedule.
Hold that thought.
Paper: A Bold Plan for a Complete Contracts Facility
P2755R0 by Joshua Berne, Jake Fevold, John Lakos.
A wild paper appears, 48 pages long! Is this the complete Contracts proposal that builds on top of the MVP, or is this something else? I think I’ve seen that before, can’t put my finger on it…
Paper: A Plan for C++26 Ranges
P2760R0 by Barry Revzin
Paper: Sender/Receiver Interface For Networking
P2762R1 by Dietmar Kühl
Remember Networking TS? It lives! Kind of.
Paper: Erroneous behaviour for missing return from assignment
P2973R0 by Jonathan Wakely and Thomas Köppe
We propose to change the behaviour of flowing off the end of an overloaded assignment operator from undefined to erroneous, erroneously returning
*this
.
struct Foo {
Foo& operator=(const Foo& rhs) {
x = rhs.x;
y = rhs.y;
// error: forgot "return *this;"!
}
};
Paper: Implication for C++
P2971R0 by Walter E. Brown
This paper proposes to introduce
operator⇒
, the implication operator, into the C++ core language.
A new operator! p ⇒ q
is equivalent to (!p) || q
p | q | p⇒q |
---|---|---|
true | true | true |
true | false | false |
false | true | true |
false | false | true |
Seems like a waste of a good operator. Give me short lambdas!
Reflection
Reddit: Is Reflection (SG7) still active?
No, it is not.
C++ Modules in CMake 3.28
After 5 years its finally done. Next cmake 3.28 release will support cpp modules C++ 20 named modules are now supported by Ninja Generators and Visual Studio Generators for VS 2022 and newer, in combination with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer.
Microsoft IFC SDK open-sourced
Cppfront autumn update
the more i look at Cpp2 the less i like the syntax it uses, it is becoming complex really fast And is great it change/improve some things but the ones i think are a mistake (like the 6 types of arguments for a function) remains so … This will end in a complex syntax and a complex lang which will be an issue sooner than later ↑
C++ Modules in Clang
- Experimental
- Relies on a temporary CMake project to build library modules
- Users need to be able to build their own BMI files
cpp-dump
Turing-complete MOV
https://x86.mov/ is Turing-complete
movfuscator – the single-instruction C compiler
Mastodon: CMake
CMake is the PHP of C++ build systems
OK, that didn’t go viral as I’d hoped.