aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/list/for_each.h
diff options
context:
space:
mode:
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);
}