Spec-Zone.ru › C++

C++ keyword: requires (since C++20)

Usage

  • Specifies a constant expression on template parameters that evaluate a requirement.
    • Within such a requirement, introduces a nested requirement.
  • In a template declaration, specifies an associated constraint.

Notes

Feature-test macro Value Std Feature
__cpp_concepts 201907L (C++20) Constraints

See also

  • class, typename
  • template
  • concept

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/keyword/requires

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API