Toggle navigation
=nil;
Foundation
=nil;
Crypto3
=nil;
Crypto3 Cryptography Suite 0.3.0
libs
algebra
include
nil
crypto3
detail
same_value.hpp
Go to the documentation of this file.
1
#ifndef CRYPTO3_ALGEBRA_DETAIL_SAME_VALUE_HPP
2
#define CRYPTO3_ALGEBRA_DETAIL_SAME_VALUE_HPP
3
4
namespace
nil
{
5
namespace
crypto3 {
6
namespace
algebra {
7
namespace
detail {
8
9
template
<
typename
T, T... v>
10
struct
all_same_value
{ };
11
12
template
<
typename
T, T v1, T v2, T... rest>
13
struct
all_same_value
<T, v1, v2, rest...> :
all_same_value
<T, v2, rest...> {
14
static_assert(v1 == v2,
"All values in the template parameter list must be equal"
);
15
static
constexpr T value = v1;
16
};
17
18
template
<
typename
T, T v>
19
struct
all_same_value
<T, v> {
20
static
constexpr T value = v;
21
};
22
23
}
// namespace detail
24
}
// namespace algebra
25
}
// namespace crypto3
26
}
// namespace nil
27
28
#endif
// CRYPTO3_ALGEBRA_DETAIL_SAME_VALUE_HPP
nil
Definition:
pair.hpp:31
nil::crypto3::algebra::detail::all_same_value
Definition:
same_value.hpp:10