llvm / llvm/llvm-project

[clang-tidy] cppcoreguidelines-missing-std-forward should also accept forward_like

Open
#195,754 1 comment 0 reactions 0 assignees View on GitHub
clang-tidy enhancement
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

cppcoreguidelines-missing-std-forward is still not detecting the need of a perfect forwarding reference when using forward_like.
Like here, we expect to forward the target of self.deref() the same way we would forward self.
``` cpp
template
struct deref {
using target = Target;

template
auto operator*(this Self&& self) -> auto&& {
return std::forward_like(self.deref());
}
};
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.