<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/freestanding-standard-library-kmx3j9uls" -->

---
title: Freestanding standard library | daily.dev
description: C++ distinguishes between hosted and freestanding implementations. Freestanding targets environments without an OS — embedded systems, kernels, bare-metal —...
canonical: https://daily.dev/posts/freestanding-standard-library-kmx3j9uls
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Freestanding standard library | daily.dev
og:description: C++ distinguishes between hosted and freestanding implementations. Freestanding targets environments without an OS — embedded systems, kernels, bare-metal —...
og:url: https://daily.dev/posts/freestanding-standard-library-kmx3j9uls
og:image: https://api.daily.dev/og/posts/KmX3J9ulS.png
og:image:alt: Freestanding standard library
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.

# Freestanding standard library

**[Sandor Dargo](https://daily.dev/sources/sandordargo)** · 4 min read · 2 upvotes · 0 comments

## Summary

C++ distinguishes between hosted and freestanding implementations. Freestanding targets environments without an OS — embedded systems, kernels, bare-metal — where heap allocation, exceptions, and system calls may be unavailable. The standard guarantees a minimal subset of headers like <cstdint>, <cstddef>, <type_traits>, and parts of <new>, while excluding OS-dependent components like <thread>, <filesystem>, and <iostream>. From C++20 through C++26, the freestanding subset has been steadily expanded to include algorithms, std::span, std::expected, std::mdspan, and smart pointer adapters, enabling more expressive code in constrained environments.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sandordargo.com/blog/2026/04/08/cpp-freestanding>

## Similar posts on daily.dev

- [Going freestanding](https://daily.dev/posts/going-freestanding-jolnir5bq) · Anton Zhiyanov · 3 upvotes · 0 comments
- [C\+\+26: Standard library hardening](https://daily.dev/posts/c-26-standard-library-hardening-eykurnwet) · Sandor Dargo · 23 upvotes · 1 comments
- [C\+\+26: Reducing undefined behaviour](https://daily.dev/posts/c-26-reducing-undefined-behaviour-tbbsne1hb) · Sandor Dargo · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/freestanding-standard-library-kmx3j9uls)

```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":"Freestanding standard library","url":"https://daily.dev/posts/freestanding-standard-library-kmx3j9uls","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/freestanding-standard-library-kmx3j9uls"},"datePublished":"2026-04-08T05:02:29.485Z","dateModified":"2026-04-08T05:02:51.780Z","description":"C++ distinguishes between hosted and freestanding implementations. Freestanding targets environments without an OS — embedded systems, kernels, bare-metal —...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc56fe31dfb8fc6b112ce220016c1fe6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc56fe31dfb8fc6b112ce220016c1fe6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Sandor Dargo","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":"Sandor Dargo","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/48d17993e5864d66951193405fa786bb","url":"https://daily.dev/sources/sandordargo"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/freestanding-standard-library-kmx3j9uls","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++,embedded","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sandor Dargo","item":"https://daily.dev/sources/sandordargo"},{"@type":"ListItem","position":3,"name":"Freestanding standard library"}]}
```

