Bug in NVCC 10.1+?

Take this MWE:

//MWE.cu
 #include <memory>
 #include <cassert>
 int main(){
   std::shared_ptr<double> A;
  using Type = typename std::pointer_traits<decltype(A)>::element_type; 
   auto b = std::make_shared<double>(0.0);
   auto c = std::make_shared<Type>(0.0);
   return 0;
 }

It compiles without problem with any c++11 enabled NVCC, gcc or clang in all linux environments I tested this.

Now take out this seemingly innocuous line:

//MWE.cu
#include <memory>
 #include <cassert>
 int main(){
   std::shared_ptr<double> A;
   using Type = typename std::pointer_traits<decltype(A)>::element_type; 
  //auto b = std::make_shared<double>(0.0);
   auto c = std::make_shared<Type>(0.0);
   return 0;
 }

Although the b line is irrelevant to the compilation of the “auto c” line, this code does not compile with CUDA 10.1 or 10.2 (it does with previous versions). It compiles just fine with a host compiler (any gcc or clang with c++11 capabilities).
Removing the “auto b” line (or in fact just moving it after the “auto c” line) results in this type of error in my system:

  error: ‘template<class _Tp> using __element_type = typename _Tp::element_type’ is private within this context
    auto c = std::make_shared<Type>(0.0);
               ^~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                
 /usr/include/c++/8/bits/ptr_traits.h:81:71: note: declared private here
       template<typename _Tp>

Can anyone reproduce this?