Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Lobste.rsEnglish · 2 days ago

Template Parameter Deduction: Eliminating Hidden Copies in Generic Code

0xghost.dev

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

Template Parameter Deduction: Eliminating Hidden Copies in Generic Code

0xghost.dev

RSS BotMB to Lobste.rsEnglish · 2 days ago
message-square
0
fedilink
Learn how template parameter deduction and perfect forwarding eliminate hidden copies in generic C++ code. This deep dive covers forwarding references, reference collapsing, variadic templates, CTAD, and the mechanics of std::forward—with practical examples showing exactly when to use T&&, decltype(auto), and std::decay_t. Includes debugging techniques, common anti-patterns, and a complete decision tree for zero-overhead generic code.

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

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: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Visibility: Public
globe

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

  • 19 users / day
  • 117 users / week
  • 336 users / month
  • 1.32K users / 6 months
  • 2 local subscribers
  • 302 subscribers
  • 10.4K Posts
  • 537 Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org