bugprone-forwarding-reference-overload: support non-type template parameters
Many concepts emulation libraries, such as the one found in Range v3, tend to use non-type template parameters for the enable_if type expression, due to their versatility in template functions and constructors containing variadic template parameter packs. Unfortunately the bugprone-forwarding-reference-overload check does not handle non-type template parameters, as was first noted in this bug report: https://bugs.llvm.org/show_bug.cgi?id=38081 This patch fixes this long standing issue and allows for the check to be suppressed with the use of a non-type template parameter containing enable_if or enable_if_t in the type expression, so long as it has a default literal value.
Loading
Please sign in to comment