6 days ago · Tech · 0 comments

Structured bindings were introduced in C++17 as an alternative way of declaring variables. They allow you to decompose an object into a set of named variables, where the collection of those bindings conceptually represents the original object as a whole. // https://godbolt.org/z/97GaMajMP #include <cassert> #include <string> struct MyStruct { int num; std::string text; ...

No comments yet. Log in to reply on the Fediverse. Comments will appear here.