Skip to content

Commit 60a4bc5

Browse files
committed
fix: added docs about deleted public ctors
1 parent 814972e commit 60a4bc5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang-tools-extra/docs/clang-tidy/checks/bugprone/crtp-constructor-accessibility.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ Example:
6565
To ensure that no accidental instantiation happens, the best practice is to
6666
make the constructor private and declare the derived class as friend. Note
6767
that as a tradeoff, this also gives the derived class access to every other
68-
private members of the CRTP.
68+
private members of the CRTP. However, constructors can still be public or
69+
protected if they are deleted.
6970

7071
Example:
7172

0 commit comments

Comments
 (0)