Skip to content

How to make specialization of boost::mpl::sequence_tag when only trait available? #71

@denzor200

Description

@denzor200

I have no problems when i know template of type, that will be passed into boost::mpl::sequence_tag:

namespace boost { namespace mpl
{
    template <typename>
    struct sequence_tag;

    template <typename... Elements>
    struct sequence_tag<std::tuple<Elements...>>
    {
        typedef fusion::fusion_sequence_tag type;
    };
}}

But my case is when have no access for std::tuple template and i only have an is_tuple trait:

namespace boost { namespace mpl
{
    template <typename, typename=void>
    struct sequence_tag;

    template <typename T>
    struct sequence_tag<T, std::enable_if_t<is_tuple<T>::value>>  // won't work
    {
        typedef fusion::fusion_sequence_tag type;
    };
}}

SFINAE is not working on boost::mpl::sequence_tag, does it have an another way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions