[special.mem.concepts] # 26 Algorithms library [[algorithms]](./#algorithms) ## 26.11 Specialized algorithms [[specialized.algorithms]](specialized.algorithms#special.mem.concepts) ### 26.11.2 Special memory concepts [special.mem.concepts] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13543) Some algorithms in this subclause are constrained with the following exposition-only concepts: [🔗](#concept:nothrow-input-iterator) `template concept [nothrow-input-iterator](#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]") && is_lvalue_reference_v> && [same_as](concept.same#concept:same_as "18.4.2 Concept same_­as [concept.same]")>, iter_value_t>; ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13555) A type I models [*nothrow-input-iterator*](#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from increment, copy construction, move construction, copy assignment, move assignment, or indirection through valid iterators[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13562) [*Note [1](#note-1)*: This concept allows some [input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]") ([[iterator.concept.input]](iterator.concept.input "24.3.4.9 Concept input_­iterator")) operations to throw exceptions[.](#3.sentence-1) — *end note*] [🔗](#concept:nothrow-sentinel-for) `template concept [nothrow-sentinel-for](#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") = [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_­for [iterator.concept.sentinel]"); // exposition only ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13575) Types S and I model [*nothrow-sentinel-for*](#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from copy construction, move construction, copy assignment, move assignment, or comparisons between valid values of type I and S[.](#4.sentence-1) [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13581) [*Note [2](#note-2)*: This concept allows some [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_­for [iterator.concept.sentinel]") ([[iterator.concept.sentinel]](iterator.concept.sentinel "24.3.4.7 Concept sentinel_­for")) operations to throw exceptions[.](#5.sentence-1) — *end note*] [🔗](#concept:nothrow-sized-sentinel-for) `template concept [nothrow-sized-sentinel-for](#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-sentinel-for](#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") && [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]"); ` [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13596) Types S and I model [*nothrow-sized-sentinel-for*](#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from the - operator for valid values of type I and S[.](#6.sentence-1) [7](#7) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13601) [*Note [3](#note-3)*: This concept allows some [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]") ([[iterator.concept.sizedsentinel]](iterator.concept.sizedsentinel "24.3.4.8 Concept sized_­sentinel_­for")) operations to throw exceptions[.](#7.sentence-1) — *end note*] [🔗](#concept:nothrow-input-range) `template concept [nothrow-input-range](#concept:nothrow-input-range "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [range](range.range#concept:range "25.4.2 Ranges [range.range]") && [nothrow-input-iterator](#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]")> && [nothrow-sentinel-for](#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]"), iterator_t>; ` [8](#8) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13617) A type R models [*nothrow-input-range*](#concept:nothrow-input-range "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from calls to ranges​::​begin andranges​::​end on an object of type R[.](#8.sentence-1) [🔗](#concept:nothrow-forward-iterator) `template concept [nothrow-forward-iterator](#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-input-iterator](#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]") && [forward_iterator](iterator.concept.forward#concept:forward_iterator "24.3.4.11 Concept forward_­iterator [iterator.concept.forward]") && [nothrow-sentinel-for](#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]"); ` [9](#9) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13632) [*Note [4](#note-4)*: This concept allows some [forward_iterator](iterator.concept.forward#concept:forward_iterator "24.3.4.11 Concept forward_­iterator [iterator.concept.forward]") ([[iterator.concept.forward]](iterator.concept.forward "24.3.4.11 Concept forward_­iterator")) operations to throw exceptions[.](#9.sentence-1) — *end note*] [🔗](#concept:nothrow-forward-range) `template concept [nothrow-forward-range](#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-input-range](#concept:nothrow-input-range "26.11.2 Special memory concepts [special.mem.concepts]") && [nothrow-forward-iterator](#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]")>; ` [🔗](#concept:nothrow-bidirectional-iterator) `template concept [nothrow-bidirectional-iterator](#concept:nothrow-bidirectional-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-forward-iterator](#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") && [bidirectional_iterator](iterator.concept.bidir#concept:bidirectional_iterator "24.3.4.12 Concept bidirectional_­iterator [iterator.concept.bidir]"); ` [10](#10) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13654) A type I models [*nothrow-bidirectional-iterator*](#concept:nothrow-bidirectional-iterator "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from decrementing valid iterators[.](#10.sentence-1) [*Note [5](#note-5)*: This concept allows some [bidirectional_iterator](iterator.concept.bidir#concept:bidirectional_iterator "24.3.4.12 Concept bidirectional_­iterator [iterator.concept.bidir]") ([[iterator.concept.bidir]](iterator.concept.bidir "24.3.4.12 Concept bidirectional_­iterator")) operations to throw exceptions[.](#10.sentence-2) — *end note*] [🔗](#concept:nothrow-bidirectional-range) `template concept [nothrow-bidirectional-range](#concept:nothrow-bidirectional-range "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-forward-range](#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") && [nothrow-bidirectional-iterator](#concept:nothrow-bidirectional-iterator "26.11.2 Special memory concepts [special.mem.concepts]")>; ` [🔗](#concept:nothrow-random-access-iterator) `template concept [nothrow-random-access-iterator](#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-bidirectional-iterator](#concept:nothrow-bidirectional-iterator "26.11.2 Special memory concepts [special.mem.concepts]") && [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_­access_­iterator [iterator.concept.random.access]") && [nothrow-sized-sentinel-for](#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]"); ` [11](#11) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13679) A type I models [*nothrow-random-access-iterator*](#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from comparisons of valid iterators, or the -, +, -=, +=, [] operators on valid values of type I and iter_difference_t[.](#11.sentence-1) [*Note [6](#note-6)*: This concept allows some [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_­access_­iterator [iterator.concept.random.access]") ([[iterator.concept.random.access]](iterator.concept.random.access "24.3.4.13 Concept random_­access_­iterator")) operations to throw exceptions[.](#11.sentence-2) — *end note*] [🔗](#itemdecl:10) `template concept [nothrow-random-access-range](#concept:nothrow-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-bidirectional-range](#concept:nothrow-bidirectional-range "26.11.2 Special memory concepts [special.mem.concepts]") && [nothrow-random-access-iterator](#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]")>; template concept [nothrow-sized-random-access-range](#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") = // exposition only [nothrow-random-access-range](#concept:nothrow-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") && [sized_range](range.sized#concept:sized_range "25.4.4 Sized ranges [range.sized]"); ` [12](#12) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13702) A type R models [*nothrow-sized-random-access-range*](#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") only if no exceptions are thrown from the call to ranges​::​size on an object of type R[.](#12.sentence-1)