GSL.concept
GSL.concept: Concepts
These concepts (type predicates) are borrowed from Andrew Sutton's Origin library, the Range proposal, and the ISO WG21 Palo Alto TR. Many of them are very similar to what became part of the ISO C++ standard in C++20.
String
Number
Boolean
Range
// in C++20,std::ranges::range
Sortable
// in C++20,std::sortable
EqualityComparable
// in C++20,std::equality_comparable
Convertible
// in C++20,std::convertible_to
Common
// in C++20,std::common_with
Integral
// in C++20,std::integral
SignedIntegral
// in C++20,std::signed_integral
SemiRegular
// in C++20,std::semiregular
Regular
// in C++20,std::regular
TotallyOrdered
// in C++20,std::totally_ordered
Function
// in C++20,std::invocable
RegularFunction
// in C++20,std::regular_invocable
Predicate
// in C++20,std::predicate
Relation
// in C++20,std::relation
- ...
GSL.ptr: Smart pointer concepts
Pointer
// A type with*
,->
,==
, and default construction (default construction is assumed to set the singular "null" value)Unique_pointer
// A type that matchesPointer
, is movable, and is not copyableShared_pointer
// A type that matchesPointer
, and is copyable