Skip to content
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

use of common, default template type when using nth_type fails on GCC 7 #151

Open
thirtytwobits opened this issue Jan 20, 2025 · 0 comments

Comments

@thirtytwobits
Copy link
Member

In variant constructors (variant.hpp) we use a pattern like:

template<typename U,
    std::size_t Ix = detail::var::best_converting_ctor_index_v<U, Ts...>,
    typename Alt                                                              = nth_type<Ix>,
    std::enable_if_t<std::is_constructible<Alt, U>::value, int>               = 0,
...

On GCC 7 the subsequent uses of Alt fail. Textually replacing Alt with nth_type<Ix> works around this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant