Permisuan
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
lysdexic@programming.devM to C++@programming.devEnglish · 4 days ago

C++26: std::inplace_vector

www.sandordargo.com

external-link
message-square
0
fedilink
1
external-link

C++26: std::inplace_vector

www.sandordargo.com

lysdexic@programming.devM to C++@programming.devEnglish · 4 days ago
message-square
0
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 register to comment.

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.

  • 12 users / day
  • 0 users / week
  • 0 users / month
  • 0 users / 6 months
  • 1 local subscriber
  • 2.35K subscribers
  • 50 Posts
  • 0 Comments
  • Modlog
  • mods:
  • lysdexic@programming.dev
  • Nihili0@programming.dev
  • UI: 0.19.5
  • BE: 0.19.19
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org