ViennaLS
Toggle main menu visibility
Loading...
Searching...
No Matches
lsConcepts.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstddef>
4
#include <type_traits>
5
6
namespace
lsConcepts
{
7
// use any type that can be assigned any value (so anything but void)
8
using
AssignType
= std::nullptr_t;
9
// some value that can be used as the default parameter
10
inline
constexpr
AssignType
assignable
=
AssignType
();
11
12
template
<
class
Base,
class
Derived>
13
using
IsBaseOf
= std::enable_if_t<std::is_base_of_v<Base, Derived>,
AssignType
>;
14
15
template
<
class
A,
class
B>
16
using
IsSame
= std::enable_if_t<std::is_same_v<A, B>,
AssignType
>;
17
18
template
<
class
A,
class
B>
19
using
IsNotSame
= std::enable_if_t<!std::is_same_v<A, B>,
AssignType
>;
20
21
template
<
class
T>
22
using
IsFloatingPoint
=
23
std::enable_if_t<std::is_floating_point_v<T>,
AssignType
>;
24
25
}
// namespace lsConcepts
lsConcepts
Definition
lsConcepts.hpp:6
lsConcepts::assignable
constexpr AssignType assignable
Definition
lsConcepts.hpp:10
lsConcepts::IsNotSame
std::enable_if_t<!std::is_same_v< A, B >, AssignType > IsNotSame
Definition
lsConcepts.hpp:19
lsConcepts::IsSame
std::enable_if_t< std::is_same_v< A, B >, AssignType > IsSame
Definition
lsConcepts.hpp:16
lsConcepts::AssignType
std::nullptr_t AssignType
Definition
lsConcepts.hpp:8
lsConcepts::IsFloatingPoint
std::enable_if_t< std::is_floating_point_v< T >, AssignType > IsFloatingPoint
Definition
lsConcepts.hpp:22
lsConcepts::IsBaseOf
std::enable_if_t< std::is_base_of_v< Base, Derived >, AssignType > IsBaseOf
Definition
lsConcepts.hpp:13
include
viennals
lsConcepts.hpp
Generated by
1.18.0