boostorg / yap

A C++14-and-later expression template library
https://boostorg.github.io/yap
Boost Software License 1.0
108 stars 28 forks source link

fixes #70: remove un-necessary constructors from expression #71

Closed rgrover closed 6 years ago

tzlaine commented 6 years ago

This is unnecessary for what we really want -- to make expression<> constexpr. This has latter change just been committed.

rgrover commented 6 years ago

What I would really like to have is the ability to initialize an expression like an aggregate. With the help of a deduction guide, such as

template <typename T>
expression(T)->expression<expr_kind::terminal, boost::hana::tuple<T>>;

I can then write expression{1}

tzlaine commented 6 years ago

CTAD works with ctors. Define one for expression<> if you like, and construct expression<>s with "expression(1)". Does that not work for some reason?

rgrover commented 6 years ago

yes, CTAD works with constructors. I essentially want constexpr expression. thanks.