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

Use explicit form of common_type_t to work around CUDA 10.1 nvcc issue #82

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

trxcllnt
Copy link
Member

@trxcllnt trxcllnt commented Nov 24, 2020

Fixes issue compiling with CUDA 10.1 nvcc (example here).

Click to expand stack trace
cuda/std/detail/libcxx/include/chrono:3121:60: error: expansion pattern ‘_Duration’ contains no argument packs
     using precision = duration<typename __CommonType::rep, ratio<1, __pow10(fractional_width)>>;
                                                            ^~~
cuda/std/detail/libcxx/include/chrono:3121:99: error: template argument 1 is invalid
     using precision = duration<typename __CommonType::rep, ratio<1, __pow10(fractional_width)>>;
cuda/std/detail/libcxx/include/chrono:3121:107: error: expected template-argument before ‘::’ token
     using precision = duration<typename __CommonType::rep, ratio<1, __pow10(fractional_width)>>;
cuda/std/detail/libcxx/include/chrono:3121:107: error: expected ‘>’ before ‘::’ token
cuda/std/detail/libcxx/include/chrono:3121:185: error: template argument 1 is invalid
     using precision = duration<typename __CommonType::rep, ratio<1, __pow10(fractional_width)>>;
cuda/std/detail/libcxx/include/chrono:3144:11: error: ‘precision’ does not name a type
     constexpr precision subseconds()    const noexcept { return __f; }
               ^~~~~~~~~
cuda/std/detail/libcxx/include/chrono:3147:11: error: ‘precision’ does not name a type
     constexpr precision to_duration() const noexcept
               ^~~~~~~~~
cuda/std/detail/libcxx/include/chrono:3154:29: error: expected type-specifier before ‘precision’
     constexpr explicit operator precision() const noexcept { return to_duration(); }
                                 ^~~~~~~~~
cuda/std/detail/libcxx/include/chrono:3161:1: error: ‘precision’ does not name a type
     precision       __f;
     ^   ~~~~~
cuda/std/detail/libcxx/include/chrono: In constructor ‘constexpr cuda::std::__3::chrono::hh_mm_ss<_Duration>::hh_mm_ss(_Duration)’:
cuda/std/detail/libcxx/include/chrono:3127:266: error: class ‘cuda::std::__3::chrono::hh_mm_ss<_Duration>’ does not have any field named ‘__f’
     constexpr explicit hh_mm_ss(_Duration __d) noexcept :
cuda/std/detail/libcxx/include/chrono:3127:285: error: ‘precision’ was not declared in this scope
     constexpr explicit hh_mm_ss(_Duration __d) noexcept :

@griwes griwes merged commit e558423 into NVIDIA:main Nov 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants