mirror of
https://github.com/Naios/continuable.git
synced 2026-02-09 11:16:40 +08:00
Fix some unit tests
This commit is contained in:
parent
02fbad159c
commit
89c3becbcf
@ -46,7 +46,7 @@ using cti::traverse_pack;
|
|||||||
struct all_map_float {
|
struct all_map_float {
|
||||||
template <
|
template <
|
||||||
typename T,
|
typename T,
|
||||||
std::enable_if_t<std::is_integral<std::decay_t<T>>::value>* = nullptr>
|
std::enable_if_t<std::is_arithmetic<std::decay_t<T>>::value>* = nullptr>
|
||||||
float operator()(T el) const {
|
float operator()(T el) const {
|
||||||
return float(el + 1.f);
|
return float(el + 1.f);
|
||||||
}
|
}
|
||||||
@ -281,7 +281,9 @@ public:
|
|||||||
explicit counter_mapper(int& counter) : counter_(counter) {
|
explicit counter_mapper(int& counter) : counter_(counter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T,
|
||||||
|
std::enable_if_t<std::is_arithmetic<std::decay_t<T>>::value ||
|
||||||
|
std::is_empty<std::decay_t<T>>::value>* = nullptr>
|
||||||
void operator()(T) const {
|
void operator()(T) const {
|
||||||
++counter_.get();
|
++counter_.get();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user