Update dependencies and regenerate CPP parser (#8)
Co-authored-by: mskelton <mskelton@users.noreply.github.com>
This commit is contained in:
co-authored by
mskelton
parent
09428146cb
commit
79d38cce37
@@ -99,9 +99,15 @@ void f(T);
|
||||
template<typename T> requires Addable<T> && Subtractable<T> // conjunctions
|
||||
T f(T);
|
||||
|
||||
template<typename T> requires Addable<T> and Subtractable<T> // conjunctions
|
||||
T f(T);
|
||||
|
||||
template<typename T> requires Addable<T> || Subtractable<T> // disjunctions
|
||||
T f(T);
|
||||
|
||||
template<typename T> requires Addable<T> or Subtractable<T> // conjunctions
|
||||
T f(T);
|
||||
|
||||
template<typename T> requires false || true // boolean literals
|
||||
T f(T);
|
||||
|
||||
@@ -253,6 +259,54 @@ T f(T);
|
||||
(parameter_list
|
||||
(parameter_declaration
|
||||
(type_identifier))))))
|
||||
(template_declaration
|
||||
(template_parameter_list
|
||||
(type_parameter_declaration
|
||||
(type_identifier)))
|
||||
(requires_clause
|
||||
(constraint_conjunction
|
||||
(template_type
|
||||
(type_identifier)
|
||||
(template_argument_list
|
||||
(type_descriptor
|
||||
(type_identifier))))
|
||||
(template_type
|
||||
(type_identifier)
|
||||
(template_argument_list
|
||||
(type_descriptor
|
||||
(type_identifier))))))
|
||||
(comment)
|
||||
(declaration
|
||||
(type_identifier)
|
||||
(function_declarator
|
||||
(identifier)
|
||||
(parameter_list
|
||||
(parameter_declaration
|
||||
(type_identifier))))))
|
||||
(template_declaration
|
||||
(template_parameter_list
|
||||
(type_parameter_declaration
|
||||
(type_identifier)))
|
||||
(requires_clause
|
||||
(constraint_disjunction
|
||||
(template_type
|
||||
(type_identifier)
|
||||
(template_argument_list
|
||||
(type_descriptor
|
||||
(type_identifier))))
|
||||
(template_type
|
||||
(type_identifier)
|
||||
(template_argument_list
|
||||
(type_descriptor
|
||||
(type_identifier))))))
|
||||
(comment)
|
||||
(declaration
|
||||
(type_identifier)
|
||||
(function_declarator
|
||||
(identifier)
|
||||
(parameter_list
|
||||
(parameter_declaration
|
||||
(type_identifier))))))
|
||||
(template_declaration
|
||||
(template_parameter_list
|
||||
(type_parameter_declaration
|
||||
@@ -322,7 +376,7 @@ requires(T x) {
|
||||
{*x} -> std::convertible_to<typename T::inner>; // the expression *x must be valid
|
||||
// AND the type T::inner must be valid
|
||||
// AND the result of *x must be convertible to T::inner
|
||||
{x + 1} -> std::same_as<int>; // the expression x + 1 must be valid
|
||||
{x + 1} -> std::same_as<int>; // the expression x + 1 must be valid
|
||||
// AND std::same_as<decltype((x + 1)), int> must be satisfied
|
||||
// i.e., (x + 1) must be a prvalue of type int
|
||||
{x * 1} -> std::convertible_to<T>; // the expression x * 1 must be valid
|
||||
@@ -401,7 +455,7 @@ Nested requirements
|
||||
template <class T>
|
||||
concept Semiregular = DefaultConstructible<T> &&
|
||||
CopyConstructible<T> && Destructible<T> && CopyAssignable<T> &&
|
||||
requires(T a, size_t n) {
|
||||
requires(T a, size_t n) {
|
||||
requires Same<T*, decltype(&a)>; // nested: "Same<...> evaluates to true"
|
||||
{ a.~T() } noexcept; // compound: "a.~T()" is a valid expression that doesn't throw
|
||||
requires Same<T*, decltype(new T)>; // nested: "Same<...> evaluates to true"
|
||||
|
||||
Reference in New Issue
Block a user