awful.systems
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
lysdexic@programming.devM to C++@programming.devEnglish · 3 months ago

C++26: std::inplace_vector

www.sandordargo.com

external-link
message-square
1
link
fedilink
8
external-link

C++26: std::inplace_vector

www.sandordargo.com

lysdexic@programming.devM to C++@programming.devEnglish · 3 months ago
message-square
1
link
fedilink
C++26 is generous with new containers — we’re getting both std::hive and std::inplace_vector. In this post, we’ll look at the latter. Until C++26, the standard library had no vector-like container with compile-time fixed capacity whose element storage is guaranteed to live inside the container object itself. std::vector obtains storage through its allocator — typically the heap. std::array has a fixed size. If you need a dynamically-resizable array that never allocates — because you’re on bare metal, because allocation latency is unacceptable, or because you need the data to live inside the object for serialization — there was no standard answer.…
alert-triangle
You must log in or # to comment.
  • basiliscos@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    nice to know! Please, continue posting new things in modern c++ )

C++@programming.dev

cpp@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !cpp@programming.dev

The center for all discussion and news regarding C++.

Rules

  • Respect instance rules.
  • Don’t be a jerk.
  • Please keep all posts related to C++.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 21 users / day
  • 45 users / week
  • 77 users / month
  • 159 users / 6 months
  • 1 local subscriber
  • 2.4K subscribers
  • 362 Posts
  • 518 Comments
  • Modlog
  • mods:
  • lysdexic@programming.dev
  • Nihili0@programming.dev
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org