Skip to content

Commit d88e5af

Browse files
author
Konstantinos Diamantis
committed
Add tags on var templates
1 parent 16fbe46 commit d88e5af

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

content/posts/perfect-forwarding-vs-variadic-templates.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
date = '2026-03-25T13:03:31+01:00'
33
draft = false
44
title = 'No Moves, In-Place Construction: Perfect Forwarding vs. Variadic Templates'
5+
tags = ["advanced-level", "templates", "performance", "Move-Semantics", "variadic-templates"]
6+
57
+++
68

79

@@ -121,3 +123,8 @@ This is because of the `addPacketForward` function, as described above.
121123
1. The **cost** of forwarding a packet is **one move operation** even when we pass **rvalues**.
122124

123125
2. The **cost** of adding a packet with **variadic templates and perfect forwarding** is **zero moves and zero copies**. This is because we construct the NetworkPacket directly **in-place** of the vector's memory, without creating any temporary objects that need to be moved or copied.
126+
127+
128+
---
129+
130+
{{< social_icons_extend_with_subscribe >}}

0 commit comments

Comments
 (0)