Announcement

Collapse
No announcement yet.

LLVM Clang 17 Adds Initial C++26 Compile Flags With -std=c++26

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dwagner
    replied
    Originally posted by Weasel View Post
    [[no_unique_address]] is the most important for me, it allows you to make zero-cost properties (accessors without separate get/set member functions).
    For me the reason to use [[no_unique_address]] was simply to keep the compiler from wasting lots of precious RAM on "alignment" in data structures, where such alignment was absolutely not necessary. Like having a member of a class that only requires 1 byte of memory, but the compiler wastes 8 bytes if an instance of that class is a member of another class - even if the "outer" class has no members that would need any 8-byte memory alignment. I must say that I would have expected this to work without the new property, because an odd address can still be unique - but apparently some part of the language standard demands otherwise.

    @Mahboi: If you don't like advancements in programming languages, just stick with Fortran77 - it's already Turing-complete, anyway.

    Leave a comment:


  • Blademasterz
    replied
    C with steroid++++++

    Leave a comment:


  • Mahboi
    replied
    c++26
    c++29
    c++32
    c++35
    c++38
    c++41
    c++44

    c++47

    STOP THE MADNESS
    STOP ADDING BLOAT TO THIS STUPID LANGUAGE

    Leave a comment:


  • reinhard_
    replied
    Is there any substantial discussion on doing something like rust editions (version 1.70 vs edition 2021), where remove all the old bad ways of doing things which have a new safer/more-efficient counterpart, perhaps alongside their normal compatibility support model?

    Leave a comment:


  • Weasel
    replied
    Originally posted by EvilHowl View Post
    std::format (C++20), ranges (C++20), modules (C++20, although not ready for real-world use yet), coroutines (C++20), std:: print (C++23), std::stacktrace (C++23).

    There any many, many more changes since C++17, but those are the most notable for me. You can go over cppreference to read all changes if you want.
    [[no_unique_address]] is the most important for me, it allows you to make zero-cost properties (accessors without separate get/set member functions). Syntax is like normal fields, so can be implicitly converted without changing source code. It's a bit convoluted to do, though, so having built-in support for them in the standard would be better.

    Leave a comment:


  • stompcrash
    replied
    I can't keep up with all of these changes to C++! It's quite interesting, though.

    Leave a comment:


  • EvilHowl
    replied
    Originally posted by david-nk View Post
    C++26 already? I must say I kind of lost track of the changes beyond C++17, even though C++ is the primary programming language I work with.
    std::format (C++20), ranges (C++20), modules (C++20, although not ready for real-world use yet), coroutines (C++20), std:: print (C++23), std::stacktrace (C++23).

    There any many, many more changes since C++17, but those are the most notable for me. You can go over cppreference to read all changes if you want.
    Last edited by EvilHowl; 16 May 2023, 06:12 AM. Reason: vBulletin keeps putting smiles on my text :P

    Leave a comment:


  • aviallon
    replied
    Originally posted by david-nk View Post
    C++26 already? I must say I kind of lost track of the changes beyond C++17, even though C++ is the primary programming language I work with.
    Very useful reference: https://en.cppreference.com/w/cpp/20

    Leave a comment:


  • fong38
    replied
    Originally posted by david-nk View Post
    C++26 already? I must say I kind of lost track of the changes beyond C++17, even though C++ is the primary programming language I work with.
    Designated initializers from C++20 are awesome, I wonder what took so long for those to land in C++ considering C had them for ages. Otherwise yeah I'm in the same boat.

    Leave a comment:


  • david-nk
    replied
    C++26 already? I must say I kind of lost track of the changes beyond C++17, even though C++ is the primary programming language I work with.

    Leave a comment:

Working...
X