-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential regression: incomplete type in tag_of is a hard error #170
Comments
Is hana tag a sequence? It seems hana passes tag type to
|
This is expected. hana::any_of(fusion::make_deque(...), pred)
using Tag = hana::tag_of<decltype(fusion::make_deque(...))>::type;
if constexpr (hana::Searchable<Tag>::value) {
// do something
} But then, hana::integral_constant<bool,
!is_default<any_of_impl<hana::tag_of<Tag>::type>>::value &&
!is_default<find_if_impl<tag_of<Tag>::type>>::value
> Here, Regardless of Hana's adapters, other clients of Fusion may have been using incomplete types for tags since this wasn't documented anywhere. |
By design, we should be able to use incomplete types. |
OK. Additionally, the change also should be applied to |
This issue was initially reported as boostorg/hana#386. The following is a hard error in Boost trunk:
I believe this started happening with boostorg/type_traits@ac35139.
fusion::tag_of
is usingboost::is_convertible
, which requires its input to be a complete type, but I don't think it is documented anywhere that tags must be complete types. Possible workarounds areis_convertible
ifboost::is_complete
is trueis_convertible
without the assertionI think (1) is the best solution, even though I am skeptical that a
is_complete
trait can even be implemented without compiler support. But since Boost.TypeTraits provides it, it seems like it's possible.The full error message (with Clang) is:
The text was updated successfully, but these errors were encountered: