GithubHelp home page GithubHelp logo

Comments (4)

Flast avatar Flast commented on July 19, 2024

Is hana tag a sequence? It seems hana passes tag type to tag_of.

../../../boost/fusion/support/tag_of.hpp:70:16: required from β€˜struct boost::fusion::traits::tag_of<boost::hana::ext::boost::fusion::deque_tag, void>’ (from boostorg/hana#386)

from fusion.

ldionne avatar ldionne commented on July 19, 2024

This is expected. hana::tag_of is idempotent, so hana::tag_of<boost::hana::ext::boost::fusion::deque_tag>::type should be boost::hana::ext::boost::fusion::deque_tag. More precisely, here is what happens:

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::Searchable<Tag> is really hana::Searchable<boost::hana::ext::boost::fusion::deque_tag>, which does (with Tag = boost::hana::ext::boost::fusion::deque_tag:

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, tag_of<Tag>::type is expected to return just Tag if it's already a tag, but it hard-errors when the fusion adapters are included and the tag is incomplete, because we probe for whether the Tag is a fusion tag in that case.

Regardless of Hana's adapters, other clients of Fusion may have been using incomplete types for tags since this wasn't documented anywhere.

from fusion.

djowel avatar djowel commented on July 19, 2024

By design, we should be able to use incomplete types.

from fusion.

Flast avatar Flast commented on July 19, 2024

OK. Additionally, the change also should be applied to fusion::is_sequence.

from fusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.