You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a type_variant template class to transfer type information between components. One would be defined with C++17 as following (mine is a bit different because I don't have C++17 but the idea is the same):
template<class... T>
using type_variant = mp_transform<mp_identity, std::variant<T...>>;
If I need to set type_variant in a generic lambda then my code looks like:
type_variant<...> var;
...
[&var](auto t) { var = mp_identity<decltype(t)>{}; }
In my opinion such a code will look cleaner with using of make_mp_identity:
In my code when I glue together boost.hana and boost.mp11 kind of MPLs I use my own
make_mp_identity
function defined as following:Would it be useful to add this function to mp11 library? Probably, the function should be named
mp_make_identity
rather thatmake_mp_identity
.I can make a pull request for it if needed.
The text was updated successfully, but these errors were encountered: