From 8217405c6a359c3d15cc2ba0a5461ef95a5a52b4 Mon Sep 17 00:00:00 2001 From: Martin Moene Date: Sat, 30 Dec 2023 17:18:44 +0100 Subject: [PATCH] [skip ci] Correct URLs for reference [10] Generic: Discriminated Unions --- README.md | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a2b8445..800bb87 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,34 @@ [![Language](https://img.shields.io/badge/C%2B%2B-98/11-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) [![License](https://img.shields.io/badge/license-BSL-blue.svg)](https://opensource.org/licenses/BSL-1.0) [![Build Status](https://github.com/martinmoene/optional-lite/actions/workflows/ci.yml/badge.svg)](https://github.com/martinmoene/optional-lite/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/1oq5gjm7bufrv6ib?svg=true)](https://ci.appveyor.com/project/martinmoene/optional-lite) [![Version](https://badge.fury.io/gh/martinmoene%2Foptional-lite.svg)](https://github.com/martinmoene/optional-lite/releases) [![download](https://img.shields.io/badge/latest-download-blue.svg)](https://raw.githubusercontent.com/martinmoene/optional-lite/master/include/nonstd/optional.hpp) [![Conan](https://img.shields.io/badge/on-conan-blue.svg)](https://conan.io/center/optional-lite) [![Try it online](https://img.shields.io/badge/on-wandbox-blue.svg)](https://wandbox.org/permlink/bfZdDT4WerPNZi6b) [![Try it on godbolt online](https://img.shields.io/badge/on-godbolt-blue.svg)](https://godbolt.org/z/3tecRa) **Contents** -- [Example usage](#example-usage) -- [In a nutshell](#in-a-nutshell) -- [License](#license) -- [Dependencies](#dependencies) -- [Installation](#installation) -- [Synopsis](#synopsis) -- [Comparison of std::optional, optional lite and Boost.Optional](#comparison-of-stdoptional-optional-lite-and-boostoptional) -- [Reported to work with](#reported-to-work-with) -- [Building the tests](#building-the-tests) -- [Implementation notes](#implementation-notes) -- [Other implementations of optional](#other-implementations-of-optional) -- [Notes and references](#notes-and-references) -- [Appendix](#appendix) +- [optional lite: A single-file header-only version of a C++17-like optional, a nullable object for C++98, C++11 and later](#optional-lite-a-single-file-header-only-version-of-a-c17-like-optional-a-nullable-object-for-c98-c11-and-later) + - [Example usage](#example-usage) + - [Compile and run](#compile-and-run) + - [In a nutshell](#in-a-nutshell) + - [License](#license) + - [Dependencies](#dependencies) + - [Installation](#installation) + - [Synopsis](#synopsis) + - [Types and values in namespace nonstd](#types-and-values-in-namespace-nonstd) + - [Interface of *optional lite*](#interface-of-optional-lite) + - [Algorithms for *optional lite*](#algorithms-for-optional-lite) + - [Configuration](#configuration) + - [Tweak header](#tweak-header) + - [Standard selection macro](#standard-selection-macro) + - [Select `std::optional` or `nonstd::optional`](#select-stdoptional-or-nonstdoptional) + - [Disable extensions](#disable-extensions) + - [Disable exceptions](#disable-exceptions) + - [Macros to control alignment](#macros-to-control-alignment) + - [Comparison of std::optional, optional lite and Boost.Optional](#comparison-of-stdoptional-optional-lite-and-boostoptional) + - [Reported to work with](#reported-to-work-with) + - [Building the tests](#building-the-tests) + - [Implementation notes](#implementation-notes) + - [Object allocation and alignment](#object-allocation-and-alignment) + - [Other implementations of optional](#other-implementations-of-optional) + - [Notes and references](#notes-and-references) + - [Appendix](#appendix) + - [A.1 Compile-time information](#a1-compile-time-information) + - [A.2 Optional Lite test specification](#a2-optional-lite-test-specification) ## Example usage @@ -388,7 +403,7 @@ For more information on constructed unions and alignment, see [10-14]. [9] Fernando Cacciola. [Boost.Optional Quick start guide](http://www.boost.org/doc/libs/1_57_0/libs/optional/doc/html/boost_optional/quick_start.html). -[10] Andrei Alexandrescu. [Generic: Discriminated Unions part 1](http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/2002/cexp2004/alexandr/alexandr.htm), [part 2](http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/2002/cexp2006/alexandr/alexandr.htm), [part 3](http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/2002/cexp2008/alexandr/alexandr.htm). April 2002. +[10] Andrei Alexandrescu. [Generic: Discriminated Unions part 1](http://erdani.org/publications/cuj-04-2002.php.html), [part 2](http://erdani.org/publications/cuj-06-2002.php.html), [part 3](http://erdani.org/publications/cuj-08-2002.php.html). April 2002. [11] Herb Sutter. [Style Case Study #3: Construction Unions](http://www.gotw.ca/gotw/085.htm). GotW #85. 2009