summaryrefslogtreecommitdiff
path: root/boost/hana/concept/foldable.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/hana/concept/foldable.hpp')
-rw-r--r--boost/hana/concept/foldable.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/boost/hana/concept/foldable.hpp b/boost/hana/concept/foldable.hpp
index 7737a74ce0..5efd153c2f 100644
--- a/boost/hana/concept/foldable.hpp
+++ b/boost/hana/concept/foldable.hpp
@@ -15,17 +15,19 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/hana/config.hpp>
#include <boost/hana/core/default.hpp>
#include <boost/hana/core/tag_of.hpp>
+#include <boost/hana/detail/integral_constant.hpp>
#include <boost/hana/fold_left.hpp>
#include <boost/hana/unpack.hpp>
BOOST_HANA_NAMESPACE_BEGIN
template <typename T>
- struct Foldable {
- using Tag = typename tag_of<T>::type;
- static constexpr bool value = !is_default<fold_left_impl<Tag>>::value ||
- !is_default<unpack_impl<Tag>>::value;
- };
+ struct Foldable
+ : hana::integral_constant<bool,
+ !is_default<fold_left_impl<typename tag_of<T>::type>>::value ||
+ !is_default<unpack_impl<typename tag_of<T>::type>>::value
+ >
+ { };
BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_CONCEPT_FOLDABLE_HPP