From 2673f3f9b31ef888fb62dc15cbc46f8699e75ab1 Mon Sep 17 00:00:00 2001 From: Iliyan Dragnev Date: Mon, 16 Sep 2019 19:56:05 +0300 Subject: [PATCH] Fix mistakes in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d39728c..53cd7b0 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,10 @@ The interface is the same as `std::optional`, but the following member functions * `tl::optional s = opt_string.map_or(&std::string::size, 0);` - `map_or_else`: carries out a `map` if there is a value, otherwise returns the result of a given default function. * `std::size_t get_default();` - * `tl::optional s = opt_string.map_or(&std::string::size, get_default);` + * `tl::optional s = opt_string.map_or_else(&std::string::size, get_default);` - `conjunction`: returns the argument if a value is stored in the optional, otherwise an empty optional. * `tl::make_optional(42).conjunction(13); //13` - * `tl::optional){}.conjunction(13); //empty` + * `tl::optional{}.conjunction(13); //empty` - `disjunction`: returns the argument if the optional is empty, otherwise the current value. * `tl::make_optional(42).disjunction(13); //42` * `tl::optional{}.disjunction(13); //13` @@ -73,7 +73,7 @@ int i = 42; tl::optional o = i; *o == 42; //true i = 12; -*o = 12; //true +*o == 12; //true &*o == &i; //true ```