-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
In the following C++ code, the method linked to in the specialization cannot be found.
#include <type_traits>
/// Generic template
template<class T, class Enabled = void>
class Foo { };
/// Specialization.
/**
* Link to #Bar(). This one is not found.
*/
template<class T>
class Foo<
T,
std::enable_if_t<std::is_base_of<T, typename T::Type>::value>>
{
public:
/// Computes stuff, another #Bar() link, also not found and reported twice.
void Bar() const { }
};To Reproduce
Reproducer
warning_explicit_link.zip
Expected behavior
I think the link to Bar() should be found and resolved.
Version
The following reproduces the warning on both 1.11 and current master (6221f43). Both installed using homebrew on Mac.
Additional context
It seems to work if in the enable_if_t I replace std::is_base_of<T, typename T::Type>::value by std::is_base_of_v<T, typename T::Type>, but unfortunately in the "real" code, no _v version of the problematic trait exists.
Reactions are currently unavailable