-Wdocumentation misleading diagnostic with template specialzation (original) (raw)
#include
/// @brief brief /// @tparam T type template <class T, class = void> constexpr auto var = T{};
/// @brief brief /// @tparam T integral type template constexpr auto var<T, std::enable_if_t<std::is_integral_v>> = T{}
:9:6: warning: '@tparam' command used in a comment that is not attached to a template declaration [-Wdocumentation] 9 | /// @tparam T integral type | ^~~~~~ 1 warning generated.https://godbolt.org/z/Gx9bfYf4W
The documentation is still useful in the specialization.