StormByte C++ Library 1.2.0
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
categories.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte.
5 *
6 * StormByte is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License version 3
8 * or later, as published by the Free Software Foundation.
9 *
10 * StormByte is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with StormByte. If not, see
17 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
18 */
19
20#pragma once
21
22// NullablePointer uses ExplicitlyConvertibleTo: must come after conversions.hxx.
24
25#include <type_traits>
26
31namespace StormByte {
32 namespace Type {
48 template<typename T>
49 concept Reference = std::is_reference_v<T>;
50
64 template<typename T>
65 concept LvalueReference = std::is_lvalue_reference_v<T>;
66
79 template<typename T>
80 concept RvalueReference = std::is_rvalue_reference_v<T>;
81
91 template<typename T>
92 concept Pointer = std::is_pointer_v<T>;
93
107 template<typename T>
108 concept SmartPointer =
110 requires(std::remove_cvref_t<T> const& p) {
111 { *p };
112 { p.operator->() };
113 { p.get() };
114 };
115
124 template<typename T>
128
138 template<typename T>
139 concept Integral = std::is_integral_v<T>;
140
150 template<typename T>
151 concept FloatingPoint = std::is_floating_point_v<T>;
152
162 template<typename T>
164
176 template<typename T>
177 concept Signed = std::is_signed_v<T>;
178
188 template<typename T>
189 concept Unsigned = std::is_unsigned_v<T>;
190
203 template<typename T>
204 concept Const = std::is_const_v<T>;
205
215 template<typename T>
216 concept Class = std::is_class_v<T>;
218 }
219}
Integral or floating-point type.
Definition categories.hxx:163
Class or struct type (not union, not enum).
Definition categories.hxx:216
Top-level const qualifier (std::is_const_v).
Definition categories.hxx:204
From may be explicitly converted to To with static_cast.
Definition conversions.hxx:57
Floating-point type (float, double, long double).
Definition categories.hxx:151
Integral type (bool, char, int, long, …), including cv.
Definition categories.hxx:139
Lvalue reference type (std::is_lvalue_reference).
Definition categories.hxx:65
Smart pointer-like type that can test whether it contains an object.
Definition categories.hxx:125
Raw (possibly cv-qualified) pointer type.
Definition categories.hxx:92
Lvalue or rvalue reference type.
Definition categories.hxx:49
Rvalue reference type (std::is_rvalue_reference).
Definition categories.hxx:80
Signed arithmetic type (std::is_signed).
Definition categories.hxx:177
Smart pointer-like type: dereferenceable and exposes get().
Definition categories.hxx:108
Unsigned arithmetic type (std::is_unsigned).
Definition categories.hxx:189
Root namespace of the StormByte suite.