NVIDIA / NVTX

The NVIDIA® Tools Extension SDK (NVTX) is a C-based Application Programming Interface (API) for annotating events, code ranges, and resources in your applications.
Apache License 2.0
312 stars 48 forks source link

error: declaration of template parameter ‘D’ shadows template parameter #46

Closed nvibd closed 3 years ago

nvibd commented 3 years ago

I am running into a build error on Ubuntu 18.04, g++ 9.3.0, nvcc / CUDA 11.3.

This is using the C++ version on the dev branch, added to the project via CMake. The error is produced from a simple include of the library (#include <nvtx3/nvtx3.hpp>).

/home/user/dev/project/build/_deps/nvtxpp-src/cpp/include/nvtx3/nvtx3.hpp:2212:11: error: declaration of template parameter ‘D’ shadows template parameter
 2212 |   template <typename D>
      |           ^~~~~
/home/user/dev/project/build/_deps/nvtxpp-src/cpp/include/nvtx3/nvtx3.hpp:2128:11: note: template parameter ‘D’ declared here
 2128 | template <typename D = domain::global>
      |           ^~~~~

Apart from this error, the same line is also referenced in many warnings that state the same.

nvibd commented 3 years ago

Already fixed in https://github.com/NVIDIA/NVTX/pull/41.