<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/august-21-2026-rojhbqsrr" -->

---
title: August 21, 2026 | daily.dev
description: A practical walkthrough applying template bloat reduction principles in C++ by factoring out the type-dependent portions of a templated function, continuing a...
canonical: https://daily.dev/posts/august-21-2026-rojhbqsrr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: August 21, 2026 | daily.dev
og:description: A practical walkthrough applying template bloat reduction principles in C++ by factoring out the type-dependent portions of a templated function, continuing a...
og:url: https://daily.dev/posts/august-21-2026-rojhbqsrr
og:image: https://api.daily.dev/og/posts/rOjHbqsRR.png
og:image:alt: August 21, 2026
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# August 21, 2026

**[The Old New Thing](https://daily.dev/sources/oldnewthing)** · 1 min read · 0 upvotes · 0 comments

## Summary

A practical walkthrough applying template bloat reduction principles in C++ by factoring out the type-dependent portions of a templated function, continuing a series on minimizing code size caused by template instantiation.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://devblogs.microsoft.com/oldnewthing/20260821-00>

## Questions this post answers

### How can I reduce binary size caused by C++ template instantiation bloat?

Factor out the type-independent portions of a templated function into a separate non-template function or base class, so the compiler only instantiates the type-dependent parts per type. This avoids duplicating identical machine code across every template instantiation, since the shared logic gets compiled once and reused, reducing overall binary size.

_Developers optimizing C++ binary size track practical template techniques like this on daily.dev._

## Similar posts on daily.dev

- [August 20, 2026](https://daily.dev/posts/august-20-2026-zjzarhijy) · The Old New Thing · 1 upvotes · 0 comments
- [July 21, 2026](https://daily.dev/posts/july-21-2026-exucjgquw) · The Old New Thing · 0 upvotes · 0 comments
- [Why CPP is going to be relevant AGAIN?](https://daily.dev/posts/why-cpp-is-going-to-be-relevant-again--p1o0tcdzt) · Medium · 43 upvotes · 4 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#c++](https://daily.dev/tags/c++)

[View this post on daily.dev](https://daily.dev/posts/august-21-2026-rojhbqsrr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"August 21, 2026","url":"https://daily.dev/posts/august-21-2026-rojhbqsrr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/august-21-2026-rojhbqsrr"},"datePublished":"2026-08-21T14:42:35.788Z","dateModified":"2026-08-21T14:55:35.572Z","description":"A practical walkthrough applying template bloat reduction principles in C++ by factoring out the type-dependent portions of a templated function, continuing a...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"The Old New Thing","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Old New Thing","logo":"https://media.daily.dev/image/upload/s--jKXDeorG--/f_auto,q_auto/v1783840773/logos/oldnewthing?_a=BAMAMicg0","url":"https://daily.dev/sources/oldnewthing"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/august-21-2026-rojhbqsrr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,c++","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Old New Thing","item":"https://daily.dev/sources/oldnewthing"},{"@type":"ListItem","position":3,"name":"August 21, 2026"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/august-21-2026-rojhbqsrr#faq","mainEntity":[{"@type":"Question","name":"How can I reduce binary size caused by C++ template instantiation bloat?","acceptedAnswer":{"@type":"Answer","text":"Factor out the type-independent portions of a templated function into a separate non-template function or base class, so the compiler only instantiates the type-dependent parts per type. This avoids duplicating identical machine code across every template instantiation, since the shared logic gets compiled once and reused, reducing overall binary size. Developers optimizing C++ binary size track practical template techniques like this on daily.dev."}}]}
```

