Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Fetch host <utility> to populate tuple_size #336

Merged
merged 2 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions include/cuda/std/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
#ifndef _CUDA_TUPLE
#define _CUDA_TUPLE

#if !defined(__CUDACC_RTC__)
// Fetch utility to get primary template for ::std::tuple_size necessary for the specialization of
// ::std::tuple_size<cuda::std::tuple> to enable structured bindings. See https://github.com/NVIDIA/libcudacxx/issues/316
#include <utility>
#endif

#include "cstdint"
#include "climits"

Expand All @@ -29,5 +35,3 @@
#include "detail/__pragma_pop"

#endif //_CUDA_TUPLE


7 changes: 5 additions & 2 deletions include/cuda/std/utility
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
#ifndef _CUDA_UTILITY
#define _CUDA_UTILITY

#if !defined(__CUDACC_RTC__)
// Fetch utility to populate tuple_size
#include <utility>
#endif

#include "type_traits"
#include "version"

Expand All @@ -23,5 +28,3 @@
#include "detail/__pragma_pop"

#endif //_CUDA_UTILITY