mirror of
https://github.com/boostorg/yap.git
synced 2026-02-25 17:02:19 +00:00
Add some comments and whitespace to detail/expression.hpp.
This commit is contained in:
@@ -13,6 +13,8 @@ namespace boost::proto17 {
|
||||
|
||||
namespace detail {
|
||||
|
||||
// partial_decay
|
||||
|
||||
template <typename T>
|
||||
struct partial_decay
|
||||
{ using type = T; };
|
||||
@@ -32,6 +34,9 @@ namespace boost::proto17 {
|
||||
template <typename R, typename ...A>
|
||||
struct partial_decay<R(A..., ...)> { using type = R(*)(A..., ...); };
|
||||
|
||||
|
||||
// operand_value_type_phase_1
|
||||
|
||||
template <
|
||||
typename T,
|
||||
typename U = typename detail::partial_decay<T>::type,
|
||||
@@ -47,6 +52,9 @@ namespace boost::proto17 {
|
||||
struct operand_value_type_phase_1<T, U, false>
|
||||
{ using type = U; };
|
||||
|
||||
|
||||
// remove_cv_ref
|
||||
|
||||
template <typename T>
|
||||
struct remove_cv_ref : std::remove_cv<std::remove_reference_t<T>>
|
||||
{};
|
||||
@@ -54,6 +62,9 @@ namespace boost::proto17 {
|
||||
template <typename T>
|
||||
using remove_cv_ref_t = typename remove_cv_ref<T>::type;
|
||||
|
||||
|
||||
// is_hana_tuple
|
||||
|
||||
template <typename T>
|
||||
struct is_hana_tuple
|
||||
{ static bool const value = false; };
|
||||
@@ -62,6 +73,9 @@ namespace boost::proto17 {
|
||||
struct is_hana_tuple<hana::tuple<T...>>
|
||||
{ static bool const value = true; };
|
||||
|
||||
|
||||
// is_expr
|
||||
|
||||
template <typename Expr, typename = std::void_t<>, typename = std::void_t<>>
|
||||
struct is_expr
|
||||
{ static bool const value = false; };
|
||||
@@ -78,6 +92,9 @@ namespace boost::proto17 {
|
||||
is_hana_tuple<remove_cv_ref_t<decltype(std::declval<Expr>().elements)>>::value;
|
||||
};
|
||||
|
||||
|
||||
// expr_ref
|
||||
|
||||
template <template <expr_kind, class> class ExprTemplate, typename T>
|
||||
struct expr_ref
|
||||
{ using type = expression_ref<T, ExprTemplate>; };
|
||||
@@ -103,6 +120,9 @@ namespace boost::proto17 {
|
||||
template <template <expr_kind, class> class ExprTemplate, typename T>
|
||||
using expr_ref_tuple_t = typename expr_ref_tuple<ExprTemplate, T>::type;
|
||||
|
||||
|
||||
// operand_type
|
||||
|
||||
template <
|
||||
template <expr_kind, class> class ExprTemplate,
|
||||
typename T,
|
||||
@@ -136,6 +156,9 @@ namespace boost::proto17 {
|
||||
template <template <expr_kind, class> class ExprTemplate, typename T>
|
||||
using operand_type_t = typename operand_type<ExprTemplate, T>::type;
|
||||
|
||||
|
||||
// make_operand
|
||||
|
||||
template <typename T>
|
||||
struct make_operand
|
||||
{
|
||||
@@ -155,6 +178,9 @@ namespace boost::proto17 {
|
||||
{ return ExprTemplate<expr_kind::expr_ref, Tuple>{Tuple{std::addressof(u)}}; }
|
||||
};
|
||||
|
||||
|
||||
// free_binary_op_result
|
||||
|
||||
template <
|
||||
template <expr_kind, class> class ExprTemplate,
|
||||
expr_kind OpKind,
|
||||
@@ -215,6 +241,9 @@ namespace boost::proto17 {
|
||||
U
|
||||
>::type;
|
||||
|
||||
|
||||
// expr_arity
|
||||
|
||||
enum class expr_arity {
|
||||
invalid,
|
||||
one,
|
||||
@@ -288,6 +317,9 @@ namespace boost::proto17 {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// tag_for
|
||||
|
||||
template <expr_kind Kind>
|
||||
constexpr auto tag_for ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user