René's URL Explorer Experiment


Title: GitHub - Sedeniono/tiny-optional: Drop-in replacement for std::optional that does not waste memory unnecessarily

Open Graph Title: GitHub - Sedeniono/tiny-optional: Drop-in replacement for std::optional that does not waste memory unnecessarily

X Title: GitHub - Sedeniono/tiny-optional: Drop-in replacement for std::optional that does not waste memory unnecessarily

Description: Drop-in replacement for std::optional that does not waste memory unnecessarily - Sedeniono/tiny-optional

Open Graph Description: Drop-in replacement for std::optional that does not waste memory unnecessarily - Sedeniono/tiny-optional

X Description: Drop-in replacement for std::optional that does not waste memory unnecessarily - Sedeniono/tiny-optional

Opengraph URL: https://github.com/Sedeniono/tiny-optional

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:0cad997d-51e6-3b3a-46fe-3fdbcab8feca
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-id8D30:3730D:1D85BBA:277A27F:698D9AB4
html-safe-nonceac621cba49bb1080e0212e618970ed73763c7728174735fb7a8ef08b5d7bb435
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDMwOjM3MzBEOjFEODVCQkE6Mjc3QTI3Rjo2OThEOUFCNCIsInZpc2l0b3JfaWQiOiI4OTYxMTU1NjQ4MDI1NjMxNDEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5b33d9a3739e86e61fa70c91b7d61f2a30bf95084343e386475e303b0ed77287
hovercard-subject-tagrepository:477105754
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/Sedeniono/tiny-optional
twitter:imagehttps://opengraph.githubassets.com/610dd4796fc6b5513cac508de32b717306520595e565c42ad902a70e28d36c4d/Sedeniono/tiny-optional
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/610dd4796fc6b5513cac508de32b717306520595e565c42ad902a70e28d36c4d/Sedeniono/tiny-optional
og:image:altDrop-in replacement for std::optional that does not waste memory unnecessarily - Sedeniono/tiny-optional
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None8c7947c0c592efeab6162b9909ad11fa43bff8b0cb5ff43273dc25e41979d43e
turbo-cache-controlno-preview
go-importgithub.com/Sedeniono/tiny-optional git https://github.com/Sedeniono/tiny-optional.git
octolytics-dimension-user_id39583823
octolytics-dimension-user_loginSedeniono
octolytics-dimension-repository_id477105754
octolytics-dimension-repository_nwoSedeniono/tiny-optional
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id477105754
octolytics-dimension-repository_network_root_nwoSedeniono/tiny-optional
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0a5dfe0647d2c1d95bb2903fa058b2543240a029
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FSedeniono%2Ftiny-optional
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FSedeniono%2Ftiny-optional
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=Sedeniono%2Ftiny-optional
Reloadhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Reloadhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Reloadhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Sedeniono https://patch-diff.githubusercontent.com/Sedeniono
tiny-optionalhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FSedeniono%2Ftiny-optional
Fork 5 https://patch-diff.githubusercontent.com/login?return_to=%2FSedeniono%2Ftiny-optional
Star 143 https://patch-diff.githubusercontent.com/login?return_to=%2FSedeniono%2Ftiny-optional
BSL-1.0 license https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/LICENSE
143 stars https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/stargazers
5 forks https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/forks
Branches https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/branches
Tags https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tags
Activity https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/activity
Star https://patch-diff.githubusercontent.com/login?return_to=%2FSedeniono%2Ftiny-optional
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FSedeniono%2Ftiny-optional
Code https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Issues 0 https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/issues
Pull requests 0 https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/pulls
Actions https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/actions
Security 0 https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/security
Insights https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/pulse
Code https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Issues https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/issues
Pull requests https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/pulls
Actions https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/actions
Security https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/security
Insights https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/pulse
Brancheshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/branches
Tagshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tags
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/branches
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tags
214 Commitshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/commits/main/
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/commits/main/
.github/workflowshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/.github/workflows
.github/workflowshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/.github/workflows
buildtimeshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/buildtimes
buildtimeshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/buildtimes
cmakehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/cmake
cmakehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/cmake
includehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/include
includehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/include
performancehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/performance
performancehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/performance
testshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/tests
testshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/tree/main/tests
.clang-formathttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/.clang-format
.clang-formathttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/.clang-format
.gitattributeshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/.gitattributes
.gitattributeshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/.gitattributes
.gitignorehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/.gitignore
.gitignorehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/.gitignore
CMakeLists.txthttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/CMakeLists.txt
CMakeLists.txthttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/CMakeLists.txt
LICENSEhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/LICENSE
LICENSEhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/LICENSE
README.mdhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/README.md
README.mdhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/README.md
READMEhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
BSL-1.0 licensehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#tinyoptional--
https://vcpkg.io/en/package/tiny-optional
https://conan.io/center/recipes/tiny-optional
https://github.com/Sedeniono/tiny-optional/releases
https://github.com/Sedeniono/tiny-optional/actions/workflows/test_gcc_linux.yml
https://github.com/Sedeniono/tiny-optional/actions/workflows/test_clang_linux.yml
https://github.com/Sedeniono/tiny-optional/actions/workflows/test_msvc_win.yml
https://github.com/Sedeniono/tiny-optional/actions/workflows/test_clang_win.yml
https://github.com/Sedeniono/tiny-optional/actions/workflows/test_gcc_win.yml
https://github.com/Sedeniono/tiny-optional/actions/workflows/test_clang_mac.yml
Introductionhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#introduction
Motivationhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#motivation
Use case 1: Wasting no memoryhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#use-case-1-wasting-no-memory
Use case 2: Using sentinel valueshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#use-case-2-using-sentinel-values
Requirementshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#requirements
Limitationshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#limitations
Platform specific behaviorhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#platform-specific-behavior
Compatibility with std::optionalhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-with-stdoptional
Installationhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#installation
Installation via package package managers (vcpkg, Conan)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#installation-via-package-package-managers-vcpkg-conan
Installation using cmakehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#installation-using-cmake
Manual installationhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#manual-installation
Preprocessor flagshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#preprocessor-flags
Compatibility between different versionshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-between-different-versions
Natvishttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#natvis
Usagehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#usage
Using tiny::optional as std::optional replacementhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#using-tinyoptional-as-stdoptional-replacement
Using a sentinel valuehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#using-a-sentinel-value
Storing the empty state in a member variablehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#storing-the-empty-state-in-a-member-variable
The full signature of tiny::optionalhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#the-full-signature-of-tinyoptional
Available non-member definitionshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#available-non-member-definitions
Helpers to distinguish types at compile-time (metaprogramming)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#helpers-to-distinguish-types-at-compile-time-metaprogramming
Specifying a sentinel value via a typehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#specifying-a-sentinel-value-via-a-type
An optional type with automatic sentinels for integers and guarantee of in-placehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#an-optional-type-with-automatic-sentinels-for-integers-and-guarantee-of-in-place
Teaching tiny::optional about custom types (tiny::optional_flag_manipulator)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#teaching-tinyoptional-about-custom-types-tinyoptional_flag_manipulator
Introductionhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#introduction-1
Example for tiny::optional_flag_manipulatorhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#example-for-tinyoptional_flag_manipulator
Detailshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#details
Storing the empty flag in only part of the payloadhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#storing-the-empty-flag-in-only-part-of-the-payload
A warning about exploiting padding byteshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#a-warning-about-exploiting-padding-bytes
Enumerationshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#enumerations
Types that you have not authoredhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#types-that-you-have-not-authored
Generic alternativehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#generic-alternative
Alternative for static constexprhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#alternative-for-static-constexpr
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
Performance resultshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#performance-results
Runtimehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#runtime
Build timehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#build-time
How the library exploits platform specific behaviorhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#how-the-library-exploits-platform-specific-behavior
Related workhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#related-work
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#introduction
std::optionalhttps://en.cppreference.com/w/cpp/utility/optional
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
live on godbolthttps://godbolt.org/z/hdxeG1aGx
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#motivation
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#use-case-1-wasting-no-memory
booleanshttps://stackoverflow.com/a/73181003/3740047
referenceshttps://stackoverflow.com/a/16515488/3740047
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#use-case-2-using-sentinel-values
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#requirements
trivial if possiblehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-with-stdoptional
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#limitations
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#platform-specific-behavior
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-with-stdoptional
of a bug in clanghttps://github.com/llvm/llvm-project/issues/45614
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#installation
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#installation-via-package-package-managers-vcpkg-conan
vcpkg.io/en/package/tiny-optionalhttps://vcpkg.io/en/package/tiny-optional
conan.io/center/recipes/tiny-optionalhttps://conan.io/center/recipes/tiny-optional
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#installation-using-cmake
find_packagehttps://cmake.org/cmake/help/latest/command/find_package.html
CMAKE_PREFIX_PATHhttps://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html
add_subdirectoryhttps://cmake.org/cmake/help/latest/command/add_subdirectory.html
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#manual-installation
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#preprocessor-flags
assert() macrohttps://en.cppreference.com/w/cpp/error/assert
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-between-different-versions
inline namespacehttps://en.cppreference.com/w/cpp/language/namespace#Inline_namespaces
Helpers to distinguish types at compile-time (metaprogramming)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#helpers-to-distinguish-types-at-compile-time-metaprogramming
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#natvis
official Microsoft documentationhttps://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#usage
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#using-tinyoptional-as-stdoptional-replacement
Compatibility with std::optionalhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-with-stdoptional
documentation of std::optionalhttps://en.cppreference.com/w/cpp/utility/optional.html
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#using-a-sentinel-value
non-type template parameter ("NTTP")https://en.cppreference.com/w/cpp/language/template_parameters
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#storing-the-empty-state-in-a-member-variable
std::optional at least until gcc 13 can trigger this warninghttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635#c69
disable the warning locallyhttps://stackoverflow.com/a/26003732/3740047
Disabling platform specific tricks (TINY_OPTIONAL_USE_SEPARATE_BOOL_INSTEAD_OF_UB_TRICKS)https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#the-full-signature-of-tinyoptional
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#available-non-member-definitions
Contrary to std::make_optional()https://en.cppreference.com/w/cpp/utility/optional/make_optional
similar to the ones for std::optionalhttps://en.cppreference.com/w/cpp/utility/optional/operator_cmp
as for std::optionalhttps://en.cppreference.com/w/cpp/utility/optional/hash
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#helpers-to-distinguish-types-at-compile-time-metaprogramming
Compatibility between different versionshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-between-different-versions
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#specifying-a-sentinel-value-via-a-type
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#an-optional-type-with-automatic-sentinels-for-integers-and-guarantee-of-in-place
this issuehttps://github.com/Sedeniono/tiny-optional/issues/1
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#teaching-tinyoptional-about-custom-types-tinyoptional_flag_manipulator
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#introduction-1
std::hashhttps://en.cppreference.com/w/cpp/utility/hash
fmt::formatterhttps://fmt.dev/latest/api.html#formatting-user-defined-types
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#example-for-tinyoptional_flag_manipulator
placement newhttps://en.cppreference.com/w/cpp/language/new
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#details
you have undefined behaviorhttps://stackoverflow.com/q/21112148/3740047
thishttps://stackoverflow.com/q/57614188/3740047
std::hashhttps://en.cppreference.com/w/cpp/utility/hash
fmt::formatterhttps://fmt.dev/latest/api.html#formatting-user-defined-types
do not represent instantiation pointshttps://stackoverflow.com/q/76148731/3740047
placement newhttps://en.cppreference.com/w/cpp/language/new
std::variant::valueless_by_exceptionhttps://en.cppreference.com/w/cpp/utility/variant/valueless_by_exception
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#storing-the-empty-flag-in-only-part-of-the-payload
this issuehttps://github.com/Sedeniono/tiny-optional/issues/4
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#a-warning-about-exploiting-padding-bytes
not guarantee that padding bytes are copiedhttps://stackoverflow.com/a/46875219/3740047
not trivial in C++20https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#compatibility-with-stdoptional
the chapterhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#storing-the-empty-state-in-a-member-variable
types that you have not authoredhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#types-that-you-have-not-authored
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#enumerations
forward declare (most) enumerationshttps://stackoverflow.com/a/1280969/3740047
those cannot be forward declaredhttps://stackoverflow.com/q/27019292/3740047
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#types-that-you-have-not-authored
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#generic-alternative
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#alternative-for-static-constexpr
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#disabling-platform-specific-tricks-tiny_optional_use_separate_bool_instead_of_ub_tricks
inline namespacehttps://en.cppreference.com/w/cpp/language/namespace#Inline_namespaces
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#performance-results
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#runtime
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/performance/results_relative.png
better at optimizing tiny::optional than std::optionalhttps://stackoverflow.com/q/72755405/3740047
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#build-time
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/buildtimes/unique_types/result_tiny_vs_std_cpp20.png
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/blob/main/buildtimes/unique_types/result_tiny_vs_std_cpp17.png
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#how-the-library-exploits-platform-specific-behavior
"Floating point exception tracking and NAN propagation" by Agner Foghttps://www.agner.org/optimize/nan_propagation.pdf
pseudo-handles on Windowshttps://devblogs.microsoft.com/oldnewthing/20210105-00/?p=104667
non-canonical addresseshttps://read.seas.harvard.edu/cs161/2018/doc/memory-layout/
pointing this outhttps://www.reddit.com/r/cpp/comments/ybc4lf/comment/itjvkmc/?utm_source=share&utm_medium=web2x&context=3
reddithttps://www.reddit.com/r/cpp/comments/ybc4lf/comment/itftn0y/?utm_source=share&utm_medium=web2x&context=3
https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#related-work
discussion on reddithttps://www.reddit.com/r/cpp/comments/ybc4lf/tinyoptional_a_c_optional_that_does_not_waste/?utm_source=share&utm_medium=web2x&context=3
compact_optionalhttps://github.com/akrzemi1/compact_optional
markablehttps://github.com/akrzemi1/markable
talk by Arthur O'Dwyer “The Best Type Traits that C++ Doesn't Have”https://youtu.be/MWBfmmg8-Yo
github repositoryhttps://github.com/Quuxplusone/from-scratch
own implementation of optionalhttps://github.com/Quuxplusone/from-scratch/tree/master/include/scratch/bits/optional
LibCathttps://github.com/Cons-Cat/libCat/blob/main/src/libraries/optional/cat/optional
foonathan/tinyhttps://github.com/foonathan/tiny
opt::optionhttps://github.com/NUCLEAR-BOMB/option
reddithttps://www.reddit.com/r/cpp/comments/1fgjhvu/optoption_a_replacement_for_stdoptional/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
referenceshttps://stackoverflow.com/q/16504643/3740047
boolshttps://stackoverflow.com/q/73180983/3740047
c-plus-plus https://patch-diff.githubusercontent.com/topics/c-plus-plus
cpp https://patch-diff.githubusercontent.com/topics/cpp
header-only https://patch-diff.githubusercontent.com/topics/header-only
optional https://patch-diff.githubusercontent.com/topics/optional
c-plus-plus-17 https://patch-diff.githubusercontent.com/topics/c-plus-plus-17
memory-efficiency https://patch-diff.githubusercontent.com/topics/memory-efficiency
c-plus-plus-20 https://patch-diff.githubusercontent.com/topics/c-plus-plus-20
cache-friendly https://patch-diff.githubusercontent.com/topics/cache-friendly
Readme https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#readme-ov-file
BSL-1.0 license https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional#BSL-1.0-1-ov-file
Please reload this pagehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
Activityhttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/activity
143 starshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/stargazers
3 watchinghttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/watchers
5 forkshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/forks
Report repository https://patch-diff.githubusercontent.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FSedeniono%2Ftiny-optional&report=Sedeniono+%28user%29
Releases 12https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/releases
v1.5.3 Latest Jan 25, 2026 https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/releases/tag/v1.5.3
+ 11 releaseshttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/releases
Please reload this pagehttps://patch-diff.githubusercontent.com/Sedeniono/tiny-optional
C++ 97.3% https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/search?l=c%2B%2B
Python 0.7% https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/search?l=python
Makefile 0.6% https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/search?l=makefile
PowerShell 0.6% https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/search?l=powershell
Shell 0.2% https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/search?l=shell
Gnuplot 0.2% https://patch-diff.githubusercontent.com/Sedeniono/tiny-optional/search?l=gnuplot
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.