sandbox
Loading...
Searching...
No Matches
concepts.hpp File Reference

Core numeric concepts and type traits. More...

#include <type_traits>
#include <numbers>
#include <limits>
#include <cmath>

Go to the source code of this file.

Classes

struct  sbx::math::is_floating_point< Type >
 Type trait identifying floating-point types. More...
 
struct  sbx::math::is_integral< Type >
 Type trait identifying non-boolean integral types. More...
 
struct  sbx::math::is_unsigned_integral< Type >
 Type trait identifying unsigned integral types. More...
 
struct  sbx::math::is_scalar< Type >
 Type trait identifying scalar types. More...
 

Namespaces

namespace  libsbx
 

Concepts

concept  sbx::math::numeric
 Concept for numeric types.
 
concept  sbx::math::floating_point
 Concept for floating-point types.
 
concept  sbx::math::integral
 Concept for non-boolean integral types.
 
concept  sbx::math::unsigned_integral
 Concept for unsigned integral types.
 
concept  sbx::math::scalar
 Concept for scalar numeric types.
 

Variables

template<typename Type >
constexpr bool sbx::math::is_floating_point_v = is_floating_point<Type>::value
 Convenience variable for is_floating_point. More...
 
template<typename Type >
constexpr bool sbx::math::is_integral_v = is_integral<Type>::value
 Convenience variable for is_integral. More...
 
template<typename Type >
constexpr bool sbx::math::is_unsigned_integral_v = is_unsigned_integral<Type>::value
 Convenience variable for is_unsigned_integral. More...
 
template<typename Type >
constexpr bool sbx::math::is_scalar_v = is_scalar<Type>::value
 Convenience variable for is_scalar. More...
 

Detailed Description

Core numeric concepts and type traits.

This header defines foundational type traits and C++20 concepts used throughout the math module. The provided concepts classify numeric, scalar, integral, and floating-point types with stricter semantics than the standard library equivalents.

These utilities are intended to enforce stronger compile-time constraints and improve readability of template interfaces.

Author
KAJ

Variable Documentation

◆ is_floating_point_v

template<typename Type >
constexpr bool sbx::math::is_floating_point_v = is_floating_point<Type>::value
inlineconstexpr

Convenience variable for is_floating_point.

Template Parameters
TypeType to test.

◆ is_integral_v

template<typename Type >
constexpr bool sbx::math::is_integral_v = is_integral<Type>::value
inlineconstexpr

Convenience variable for is_integral.

Template Parameters
TypeType to test.

◆ is_scalar_v

template<typename Type >
constexpr bool sbx::math::is_scalar_v = is_scalar<Type>::value
inlineconstexpr

Convenience variable for is_scalar.

Template Parameters
TypeType to test.

◆ is_unsigned_integral_v

template<typename Type >
constexpr bool sbx::math::is_unsigned_integral_v = is_unsigned_integral<Type>::value
inlineconstexpr

Convenience variable for is_unsigned_integral.

Template Parameters
TypeType to test.