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

Two conversion operators implemented together in struct tuple from namespace oneapi::dpl::__internal #2017

Open
SergeyKopienko opened this issue Jan 22, 2025 · 0 comments

Comments

@SergeyKopienko
Copy link
Contributor

Based on #2013 and comment #2013 (comment)
looks like we have problem in the code

operator ::std::tuple<U1, U...>() const
:

  • we may have the problem that implemented two conversion operators together:
    // conversion to ::std::tuple with the same template arguments
    operator ::std::tuple<T1, T...>() const
    {
        static constexpr ::std::size_t __tuple_size = sizeof...(T) + 1;
        return to_std_tuple(*this, ::std::make_index_sequence<__tuple_size>());
    }

    // conversion to ::std::tuple with the different template arguments
    template <typename U1, typename... U>
    operator ::std::tuple<U1, U...>() const
    {
        constexpr ::std::size_t __tuple_size = sizeof...(T) + 1;
        return to_std_tuple(static_cast<tuple<U1, U...>>(*this), ::std::make_index_sequence<__tuple_size>());
    }
@SergeyKopienko SergeyKopienko changed the title Two conversion operators implemented together in struct tuple Two conversion operators implemented together in struct tuple Jan 22, 2025
@SergeyKopienko SergeyKopienko changed the title Two conversion operators implemented together in struct tuple Two conversion operators implemented together in struct tuple from namespace oneapi::dpl::__internal Jan 22, 2025
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