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

  • #11
    C with steroid++++++

    Comment


    • #12
      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.

      Comment

      Working...
      X