From 5b7cd4c71e0840b4e2a86d97138b58b115126db5 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sat, 19 Nov 2016 12:18:57 -0600 Subject: [PATCH] typename operand_type<>::type -> operand_type_t<> --- detail/expression.hpp | 3 +++ expression.hpp | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/detail/expression.hpp b/detail/expression.hpp index 991ba61..ff3f400 100644 --- a/detail/expression.hpp +++ b/detail/expression.hpp @@ -79,6 +79,9 @@ namespace boost::proto17 { struct operand_type { using type = terminal; }; + template + using operand_type_t = typename operand_type::type; + template struct expression_from_tuple; diff --git a/expression.hpp b/expression.hpp index d082a89..8a3318d 100644 --- a/expression.hpp +++ b/expression.hpp @@ -127,7 +127,7 @@ namespace boost::proto17 { template \ auto operator op (U && rhs) const & \ { \ - using rhs_type = typename detail::operand_type::type; \ + using rhs_type = detail::operand_type_t; \ return expression{ \ hana::tuple{ \ *this, \ @@ -138,7 +138,7 @@ namespace boost::proto17 { template \ auto operator op (U && rhs) && \ { \ - using rhs_type = typename detail::operand_type::type; \ + using rhs_type = detail::operand_type_t; \ return expression{ \ hana::tuple{ \ std::move(*this), \ @@ -169,7 +169,7 @@ namespace boost::proto17 { template auto operator, (U && rhs) const & { - using rhs_type = typename detail::operand_type::type; + using rhs_type = detail::operand_type_t; return expression{ hana::tuple{*this, static_cast(rhs)} }; @@ -177,7 +177,7 @@ namespace boost::proto17 { template auto operator, (U && rhs) && { - using rhs_type = typename detail::operand_type::type; + using rhs_type = detail::operand_type_t; return expression{ hana::tuple{std::move(*this), static_cast(rhs)} }; @@ -202,13 +202,13 @@ namespace boost::proto17 { template auto operator() (U && ...u) const & { - using tuple_type = hana::tuple::type...>; + using tuple_type = hana::tuple...>; return detail::make_call_expression(*this, static_cast(u)...); } template auto operator() (U && ...u) && { - using tuple_type = hana::tuple::type...>; + using tuple_type = hana::tuple...>; return detail::make_call_expression(std::move(*this), static_cast(u)...); } }; @@ -219,7 +219,7 @@ namespace boost::proto17 { bool Expr = detail::is_expr>::value> struct binary_op_result { - using lhs_type = typename detail::operand_type::type; + using lhs_type = detail::operand_type_t; using rhs_type = U; using type = expression; }; @@ -235,7 +235,7 @@ namespace boost::proto17 { auto operator op (T && lhs, expression const & rhs) \ -> typename detail::binary_op_result>::type \ { \ - using lhs_type = typename detail::operand_type::type; \ + using lhs_type = detail::operand_type_t; \ using rhs_type = expression; \ return { \ hana::tuple{static_cast(lhs), rhs} \ @@ -245,7 +245,7 @@ namespace boost::proto17 { auto operator op (T && lhs, expression && rhs) \ -> typename detail::binary_op_result>::type \ { \ - using lhs_type = typename detail::operand_type::type; \ + using lhs_type = detail::operand_type_t; \ using rhs_type = expression; \ return { \ hana::tuple{static_cast(lhs), static_cast(rhs)} \