aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/list/for_each.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-06 19:40:55 +0100
committerAdrian Kummerlaender2015-02-06 19:40:55 +0100
commit32abf81176f654217c30f3a1dd25ba9ff4a67dc4 (patch)
treef04b90c72077e7726ab4fc8e9bfec9afe5465579 /src/runtime/list/for_each.h
parent27aaee43499c268903332c7e9e1e6ec2d193dc3a (diff)
downloadTypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.tar
TypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.tar.gz
TypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.tar.bz2
TypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.tar.lz
TypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.tar.xz
TypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.tar.zst
TypeAsValue-32abf81176f654217c30f3a1dd25ba9ff4a67dc4.zip
Moved _SFINAE_ helper into separate header
Diffstat (limited to 'src/runtime/list/for_each.h')
-rw-r--r--src/runtime/list/for_each.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/list/for_each.h b/src/runtime/list/for_each.h
index 1ca2034..b7496a8 100644
--- a/src/runtime/list/for_each.h
+++ b/src/runtime/list/for_each.h
@@ -3,6 +3,7 @@
#include <type_traits>
+#include "sfinae.h"
#include "list/list.h"
namespace tav {
@@ -11,17 +12,17 @@ namespace runtime {
template <
typename Current,
typename Function,
- typename std::enable_if<std::is_void<Current>::value, std::size_t>::type = 0
+ detail::enable_if<std::is_void<Current>::value> = 0
>
void for_each(const Function&) { }
template <
typename Current,
typename Function,
- typename std::enable_if<!std::is_void<Current>::value, std::size_t>::type = 0
+ detail::enable_if<!std::is_void<Current>::value> = 0
>
void for_each(const Function& function) {
- function(Head<Current>::type::value);
+ function(Head<Current>::value);
for_each<Tail<Current>, Function>(function);
}