1. X
  2. CPPAlliance
Log inSign up
CPPAlliance
253 posts
CPPAlliance profile banner
user avatar

CPPAlliance

@CPPAlliance
Our mission is to make the C++ programming language accessible and useful to anyone who wishes to learn and apply the language.
Joined November 2017
36
Following
1,193
Followers
RepliesRepliesMediaMedia
  • user avatar
    CPPAlliance
    @CPPAlliance
    Aug 14
    constexpr auto x = std::sqrt(2.0); // error in C++23 You can do compile time integer math. You can do compile time string processing. But std::sqrt, std::sin, std::pow? "Not a constant expression" C++26 makes nearly all of <cmath> constexpr 🧵👇
  • user avatar
    CPPAlliance
    @CPPAlliance
    Aug 13
    vector, array, string, string_view, deque. Every contiguous container gives you .at() for bounds checked access span? No .at(). Just operator[] and hope you indexed right C++26 finally fixes it 🧵👇
  • user avatar
    CPPAlliance
    @CPPAlliance
    Aug 12
    std::visit(overloaded{ [](int i) { ... }, [](std::string s) { ... } }, v); The variant goes at the end, the visitor goes first. It reads inside out C++26 flips it: v.visit(...)
  • user avatar
    CPPAlliance
    @CPPAlliance
    Aug 11
    Three vectors. You want to iterate over all of them as one sequence C++23 ranges: copy everything into a new container, or write three separate loops C++26: views::concat(v1, v2, v3) — zero copies, one range
  • user avatar
    CPPAlliance
    @CPPAlliance
    Aug 10
    const std::string& get() { return "oops"; // dangling reference } This compiles in C++23. The temporary string is destroyed, the reference dangles, and you get undefined behavior at runtime C++26 makes it a compile time error 🧵👇

Log in or sign up for X

See what’s happening and join the conversation

Continue with phone
or
Log in with username or email
Terms·Privacy·Cookies·Accessibility·Ads Info·© 2026 X Corp.
Advertisement
Advertisement