Files
cppdraft_translate/cppdraft/concept/regularinvocable.md
2025-10-25 03:02:53 +03:00

48 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[concept.regularinvocable]
# 18 Concepts library [[concepts]](./#concepts)
## 18.7 Callable concepts [[concepts.callable]](concepts.callable#concept.regularinvocable)
### 18.7.3 Concept regular_invocable [concept.regularinvocable]
[🔗](#concept:regular_invocable)
`template<class F, class... Args>
concept [regular_invocable](#concept:regular_invocable "18.7.3Concept regular_­invocable[concept.regularinvocable]") = [invocable](concept.invocable#concept:invocable "18.7.2Concept invocable[concept.invocable]")<F, Args...>;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L1244)
The invoke function call expression shall be
equality-preserving ([[concepts.equality]](concepts.equality "18.2Equality preservation")) and
shall not modify the function object or the arguments[.](#1.sentence-1)
[*Note [1](#note-1)*:
This requirement supersedes the annotation in the definition of[invocable](concept.invocable#concept:invocable "18.7.2Concept invocable[concept.invocable]")[.](#1.sentence-2)
— *end note*]
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L1253)
[*Example [1](#example-1)*:
A random number generator does not model [regular_invocable](#concept:regular_invocable "18.7.3Concept regular_­invocable[concept.regularinvocable]")[.](#2.sentence-1)
— *end example*]
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/concepts.tex#L1258)
[*Note [2](#note-2)*:
The distinction between [invocable](concept.invocable#concept:invocable "18.7.2Concept invocable[concept.invocable]") and [regular_invocable](#concept:regular_invocable "18.7.3Concept regular_­invocable[concept.regularinvocable]") is purely semantic[.](#3.sentence-1)
— *end note*]