NumCpp
2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
c
d
e
g
h
i
j
m
n
o
p
s
t
v
Typedefs
Enumerations
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
c
d
e
i
l
m
n
p
r
s
t
v
x
y
z
Typedefs
a
c
d
i
p
r
s
t
v
Enumerations
Related Symbols
Files
File List
Globals
All
Macros
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
StaticAsserts.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include <type_traits>
31
32
#include "
NumCpp/Core/Internal/TypeTraits.hpp
"
33
34
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
35
#define STATIC_ASSERT_VALID_DTYPE(dtype) \
36
static_assert(nc::is_valid_dtype_v<dtype>, "Template type is not a valid dtype for NdArray")
35
#define STATIC_ASSERT_VALID_DTYPE(dtype) \
…
37
38
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
39
#define STATIC_ASSERT_ARITHMETIC(dtype) \
40
static_assert(std::is_arithmetic_v<dtype>, "Can only be used with arithmetic types")
39
#define STATIC_ASSERT_ARITHMETIC(dtype) \
…
41
42
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
43
#define STATIC_ASSERT_INTEGER(dtype) static_assert(std::is_integral_v<dtype>, "Can only be used with integer types")
44
45
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
46
#define STATIC_ASSERT_UNSIGNED_INTEGER(dtype) \
47
static_assert(std::is_integral_v<dtype> && std::is_unsigned_v<dtype>, "Can only be used with integer types")
46
#define STATIC_ASSERT_UNSIGNED_INTEGER(dtype) \
…
48
49
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
50
#define STATIC_ASSERT_FLOAT(dtype) static_assert(std::is_floating_point_v<dtype>, "Can only be used with float types")
51
52
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
53
#define STATIC_ASSERT_COMPLEX(dtype) static_assert(nc::is_complex_v<dtype>, "Can only be used with std::complex types")
54
55
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
56
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype) \
57
static_assert(std::is_arithmetic_v<dtype> || nc::is_complex_v<dtype>, \
58
"Can only be used with arithmetic types or std::complex types")
56
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype) \
…
TypeTraits.hpp
include
NumCpp
Core
Internal
StaticAsserts.hpp
Generated by
1.9.8