#Cpp26

David Chisnall (*Now with 50% more sarcasm!*)david_chisnall@infosec.exchange
2025-07-10

Folks who have worked on / tried #cpp26 reflection APIs (I've reviewed so many different versions I can't remember what the final spec looks like):

Is there a way of providing an identifier as a template parameter that can be used for reflection later? The specific thing that I want to do is provide a bare name of an enum that is declared inside another class, but where the template function is able to derive the path to the enum definition and so can do its own lookup with reflection.

David Vokilovoki
2025-06-30

Run-time reflexion in C++26... Wow, i was expecting that since 2004. That's one of the reasons we meta-programmed Dynamic Types in CLAM.

youtube.com/watch?v=TOKP7k66VBw

2025-06-21

And we just renamed it again. Who would have thought that we can name something 'vec' when we already have 'vector' 😅.
It'll be std::simd::vec<T, N> and std::simd::mask<T, N> in C++26.
Also vec and mask are (read-only) ranges now (range-based for works) and we got permutations, gather & scatter, compress & expand as well as mask conversions to and from bitset and unsigned. 🥳
Lot's of implementation and optimization work ahead for me now.

#cpp26 #simd #cplusplus #cpp

2025-06-19

Trying to recap the status of #Cpp26 so far.

What's in (top picks):
- Execution library (async).
- Contracts [*].
- Erroneous Behavior (replaces Undefined Behavior for uninitialized values).
- Hardened library (out-of-bounds assertions).
- #embed.
- Linear algebra, SIMD, hive and RCU.

Not yet:
- Reflection.

Unlikely:
- Profiles.
- Pattern matching.
- Networking.

Definitely not:
- Safe C++.

[*] Bjarne has publicly said he wants to roll contracts back.

2025-06-08

C++OnSea 2025 SESSION ANNOUNCEMENT: C++ Contracts: a Meaningfully Viable Product by Andrei Zissu

cpponsea.uk/2025/session/cpp-c

Register now at cpponsea.uk/tickets/

#Contracts #cplusplus #cpp #Cpp26

2025-05-27

C++OnSea 2025 SESSION ANNOUNCEMENT: C++ Contracts: a Meaningfully Viable Product by Andrei Zissu

cpponsea.uk/2025/session/cpp-c

Register now at cpponsea.uk/tickets/

#Contracts #cplusplus #cpp #Cpp26

2025-05-16

There's resistance against using the same name in a namespace and a type inside that namespace. Why? What is the actual problem with this code? Is the 'foo::foo' looking too much like a constructor definition (in that context)? Isn't it great how the call to 'bar' has a clear relation to 'foo'?
Why is it considered bad practice that shouldn't pass code review?

#cpp #cplusplus #WG21 #cpp26 #namingThingsIsHard

namespace lib
{
  namespace foo
  {
    template <typename T>
    class foo;

    template <typename T>
    T bar(foo<T>);
  }
}

namespace foo = lib::foo;

template <typename T>
void f(const foo::foo<T>& x)
{
  auto y = foo::bar(x);
  // ...
}
Andreas Fertigandreasfertig@mas.to
2025-05-13
Sune Stolborg Vuorelasvuorela@floss.social
2025-05-12

in C++26, a std::optional is a range::view. I wonder when it gets begin() and end() iterators for a range-based loop and such. #cpp #cpp26

2025-05-11

TIL that C++ has contracts (preconditions etc.) since C++26. They are already implemented in GCC.

en.cppreference.com/w/cpp/lang

What do you think about that? Is it usable in freestanding environment? Do you have any experience with that?

#cpp #cpp26 #gcc

Example code from cppreference.com.

template <std::floating_point T>
constexpr auto normalize(std::array<T, 3> vector)
    pre(is_normalizable(vector))
    post(vector: is_normalized(vector))
{
C++Nowcppnow
2025-05-04

C++Now thanks think-cell for being a Track Sponsor in 2025!

Thanks to their support, we had an amazing 3-track program this year, and will soon have videos to share with the world!

C++Nowcppnow
2025-05-02

C++Now thanks think-cell for being a Track Sponsor in 2025!

Thanks to their support, we had an outstanding 3-track program this week!

C++Nowcppnow
2025-05-01

C++Now thanks think-cell for being a Track Sponsor in 2025!

Their support is helping us provide an incredible program of advanced C++ content this week!

C++Nowcppnow
2025-04-28

C++Now thanks think-cell for being a Track Sponsor in 2025!

Their generous support helped get off to a great start this year bringing exciting new content to the C++ community!

C++Nowcppnow
2025-04-27

C++Now is pleased and proud to announce think-cell is our first-ever Track Sponsor in 2025!
 
Their generous support will help us deliver outstanding C++ content to the entire world!

C++Nowcppnow
2025-04-14

C++Now 2025 SESSION ANNOUNCEMENT: How To Affect the Future of C++ Standard in 90 Minutes by River Wu

schedule.cppnow.org/session/20

Register now at cppnow.org/registration/

C++Nowcppnow
2025-04-02

C++Now 2025 SESSION ANNOUNCEMENT: Parallel Range Algorithms - The Evolution of Parallelism in C++ by Ruslan Arutyunyan

schedule.cppnow.org/session/20

Register now at cppnow.org/registration/

C++Nowcppnow
2025-03-22

C++Now 2025 SESSION ANNOUNCEMENT: How To Affect the Future of C++ Standard in 90 Minutes by River Wu

schedule.cppnow.org/session/20

Register now at cppnow.org/registration/

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst