<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/131737>131737</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
False positive for bugprone-crtp-constructor-accessibility
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kone-tlammi
</td>
</tr>
</table>
<pre>
```
$ clang-tidy --version
LLVM (http://llvm.org/):
LLVM version 19.1.7
Optimized build.
```
Snippet
```c++
template <class T>
class Base {
friend T;
Base() = default;
public:
Base(const Base&) = delete;
Base& operator=(const Base&) = delete;
Base(Base&&) = delete;
Base& operator=(Base&&) = delete;
~Base() = default;
};
class Foo : public Base<Foo> {};
```
produces
```
warning: public contructor allows the CRTP to be constructed as a regular template class; consider making it private [bugprone-crtp-constructor-accessibility]
```
for the deleted copy and move constructors.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVEFvqzgQ_jXmMgKBDQEOHJKmOXW1q91q78aeEL8abNkmVd7h_fYnHJqmPVR9EhIaz_fNfP5sD_deDRNiR6odqfYJn8PJuO7FTJgGzcdRJb2Rl45s8vXLt4SWIDSfhjQoeYE0PaPzykwk3z49_f8XENqcQrCEbQk9EHrQ-jxmxg0xapflfAsQoSsTijYrsjqu_22DGtVPlNDPSstsaXjfPN_-NylrMdwnBKG75cu3AUereUAg7EFo7j08E_ZI8u012HGPQOpdbHV0Cie5AK7xkiS0IbQFwvYg8chnHa7ZBWDnXivxtoEVLczkwxps3qkaA36suwFj0fFgHGH77xDvu9xgf9Tia1Yk_vpy0_X-Br36dzAGCHuz4tqWPRyMIewx-npjfDwz64ycBXr4lHrlblLTcFdSmCm4WQTjgGttXj2EE8LDv8__QDDQI0TfFgRK4B44OBxmzR3cjj5KJWwXoUqig5G_qGkAFcA6dY7Xo9r182DdctGFCza9lTUu5UKg96pXWoULqfafRB-Ni6KuZkoQxl6ATxJGc77TZ5zPEtkx2bKWJ9gVdUlp3ZQFS05d07f8yErEpilYTts2Zw2yqhZYlJuC0UR1NKdVzoom3xSMsYweaVlLrPhR8KpqS1LmOHKls7f3lSjvZ-wKVtSsTjTvUfv4rimd8BVillC6PHPXLaS0nwdPylwrH_x7maCCxu7AtUewxqugzgjLnr9pWDI73S0TwN9GwKDCae4zYcZ1Hqy_1DrzA0Ug9BDleUIPq_5zR38HAAD__4SiZ14">