Skip to content

push_back<vector20<...>, X>::type on MSVC triggers static assert #43

@Kojoley

Description

@Kojoley

The following code is fine on GCC and Clang, but fails on MSVC and ICC.

#include <boost/mpl/vector.hpp>
#include <boost/mpl/push_back.hpp>

struct X;

using vec = boost::mpl::vector<X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X>;
using test = boost::mpl::push_back<vec, X>::type;

https://godbolt.org/z/w-yTto

This inconsistency confuses people: 1) https://stackoverflow.com/questions/55900932/issue-with-x3-and-ms-vs2017 2) boostorg/spirit#515

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