1. X
  2. CPPAlliance
Log inSign up
CPPAlliance
257 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,192
Followers
RepliesRepliesMediaMedia
  • user avatar
    CPPAlliance
    @CPPAlliance
    17h
    constexpr auto [x, y] = std::pair{1, 2}; // error in C++23 You can constexpr a pair. You can structured bind a pair. But you can't do both at the same time C++26 removes the restriction 🧵👇
  • 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

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