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

C++26: std::inplace_vector

www.sandordargo.com

external-link
message-square
1
link
fedilink
9
external-link

C++26: std::inplace_vector

www.sandordargo.com

lysdexic@programming.devM to C++@programming.devEnglish · 22 days 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
    ·
    21 days 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.

  • 1 user / day
  • 12 users / week
  • 69 users / month
  • 154 users / 6 months
  • 1 local subscriber
  • 2.37K subscribers
  • 408 Posts
  • 641 Comments
  • Modlog
  • mods:
  • Nihili0@programming.dev
  • lysdexic@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org