-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2db504
commit bcdb456
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// -*- C++ -*- | ||
#ifndef _EZCXX_CONCEPTS | ||
#define _EZCXX_CONCEPTS | ||
|
||
#include <type_traits> | ||
|
||
#pragma clang system_header | ||
|
||
namespace std { | ||
|
||
template <class _Tp, class _Up> | ||
concept same_as = is_same<_Tp, _Up>::value && is_same<_Up, _Tp>::value; | ||
|
||
// arithmetic: | ||
|
||
template <class _Tp> | ||
concept integral = is_integral_v<_Tp>; | ||
|
||
template <class _Tp> | ||
concept signed_integral = integral<_Tp> && is_signed_v<_Tp>; | ||
|
||
template <class _Tp> | ||
concept unsigned_integral = integral<_Tp> && !signed_integral<_Tp>; | ||
|
||
template <class _Tp> | ||
concept floating_point = is_floating_point_v<_Tp>; | ||
|
||
} // namespace std | ||
|
||
#endif // _EZCXX_CONCEPTS |