Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
Concepts.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef ENIGMA_CONCEPTS_H
3 #define ENIGMA_CONCEPTS_H
4 #include <version> // for __cpp_lib_concepts
5 
6 #ifdef __cpp_lib_concepts
7 #include <concepts>
8 
9 namespace Enigma {
10  namespace Concepts {
12  template<typename T>
13  concept IsInteger = std::is_integral<T>::value && !std::is_same<T, bool>::value;
14 
16  template<typename T>
17  concept IsFloatingPoint = std::is_floating_point<T>::value;
18 
20  template<typename T>
21  concept IsBoolean = std::is_same<T, bool>::value;
22  }
23 }
24 #else
25 #pragma message("Concepts are not supported by the compiler")
26 #endif
27 
28 #endif // !ENIGMA_CONCEPTS_H