summaryrefslogtreecommitdiff
path: root/boost/hana/concept/monoid.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/hana/concept/monoid.hpp')
-rw-r--r--boost/hana/concept/monoid.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/boost/hana/concept/monoid.hpp b/boost/hana/concept/monoid.hpp
index df84bb23e6..024ce4fe28 100644
--- a/boost/hana/concept/monoid.hpp
+++ b/boost/hana/concept/monoid.hpp
@@ -15,17 +15,20 @@ 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/plus.hpp>
#include <boost/hana/zero.hpp>
BOOST_HANA_NAMESPACE_BEGIN
template <typename M>
- struct Monoid {
- using Tag = typename tag_of<M>::type;
- static constexpr bool value = !is_default<zero_impl<Tag>>::value &&
- !is_default<plus_impl<Tag, Tag>>::value;
- };
+ struct Monoid
+ : hana::integral_constant<bool,
+ !is_default<zero_impl<typename tag_of<M>::type>>::value &&
+ !is_default<plus_impl<typename tag_of<M>::type,
+ typename tag_of<M>::type>>::value
+ >
+ { };
BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_CONCEPT_MONOID_HPP