|
FlatImage
A configurable Linux containerization system
|
Custom C++ concepts for type constraints and compile-time validation. More...
#include <string>#include <type_traits>#include <variant>#include <vector>#include <optional>#include <ranges>#include <deque>#include <list>#include <set>#include <map>#include <unordered_set>#include <unordered_map>#include <memory>Go to the source code of this file.
Namespaces | |
| namespace | ns_concept |
| C++ concepts for type constraints and compile-time validation. | |
Concepts | |
| concept | ns_concept::IsInstanceOf |
| Concept to check if a type is an instance of a specific template. | |
| concept | ns_concept::Boolean |
| Concept for types that can be contextually converted to bool. | |
| concept | ns_concept::Enum |
| Concept for enumeration types. | |
| concept | ns_concept::ScopedEnum |
| Concept for scoped enumeration types (enum class) | |
| concept | ns_concept::Variant |
| Concept for std::variant types. | |
| concept | ns_concept::Uniform |
| Concept to check if all types are the same. | |
| concept | ns_concept::Iterable |
| Concept for iterable containers (has begin() and end()) | |
| concept | ns_concept::IsContainerOf |
| Concept for containers holding a specific value type. | |
| concept | ns_concept::IsVector |
| Concept for std::vector types. | |
| concept | ns_concept::IsOptional |
| Concept for std::optional types. | |
| concept | ns_concept::Container |
| Concept for standard library container types. | |
| concept | ns_concept::StringConvertible |
| Concept for types implicitly convertible to std::string. | |
| concept | ns_concept::StringConstructible |
| Concept for types that can construct a std::string. | |
| concept | ns_concept::Numeric |
| Concept for numeric types (integral or floating-point) | |
| concept | ns_concept::StreamInsertable |
| Concept for types that support stream insertion (operator<<) | |
| concept | ns_concept::StringRepresentable |
| Concept for types that can be represented as a string. | |
Enumerations | |
| enum | TestEnum { VALUE1 , VALUE2 } |
| enum class | TestEnumClass { VALUE1 , VALUE2 } |
Variables | |
| template<typename T, template< typename... > typename U> | |
| constexpr bool | ns_concept::is_instance_of_v = std::false_type {} |
| Type trait to check if a type is an instance of a template. | |
| template<template< typename... > typename U, typename... Args> | |
| constexpr bool | ns_concept::is_instance_of_v< U< Args... >, U > = std::true_type {} |
| Specialization for matching template instances. | |
Custom C++ concepts for type constraints and compile-time validation.
This file provides a comprehensive set of C++20 concepts for common type requirements, including container checks, type conversions, iterability, and more. All concepts follow the standard library naming conventions and semantics where applicable.
Definition in file concept.hpp.