Skip to content

[SYCL][NFC] Fix potential namespace conflicts with PSTL in tuple.hpp #3541

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions sycl/include/CL/sycl/detail/tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ std::tuple<Ts...> get_tuple_tail_impl(const std::tuple<T, Ts...> &Tuple,

template <typename T, typename... Ts>
std::tuple<Ts...> get_tuple_tail(const std::tuple<T, Ts...> &Tuple) {
return get_tuple_tail_impl(Tuple, std::make_index_sequence<sizeof...(Ts)>());
return sycl::detail::get_tuple_tail_impl(
Tuple, std::make_index_sequence<sizeof...(Ts)>());
}

template <typename... Ts> constexpr tuple<Ts...> make_tuple(Ts... Args) {
Expand Down Expand Up @@ -127,7 +128,7 @@ template <typename T, typename... Ts> struct tuple<T, Ts...> {

// required to convert std::tuple to inner tuple in user-provided functor
tuple(const std::tuple<T, Ts...> &RHS)
: holder(std::get<0>(RHS)), next(get_tuple_tail(RHS)) {}
: holder(std::get<0>(RHS)), next(sycl::detail::get_tuple_tail(RHS)) {}

// Convert to std::tuple with the same template arguments.
operator std::tuple<T, Ts...>() const {
Expand Down Expand Up @@ -157,7 +158,7 @@ template <typename T, typename... Ts> struct tuple<T, Ts...> {
template <typename UT, typename... UTs>
tuple &operator=(const std::tuple<UT, UTs...> &RHS) {
holder.value = std::get<0>(RHS);
next = get_tuple_tail(RHS);
next = sycl::detail::get_tuple_tail(RHS);
return *this;
}

Expand Down