Make CRTP base classes ctors protected
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m39s
All checks were successful
Chaos Ci / test-and-benchmark (push) Successful in 1m39s
This forbids to create base class instances which direct usage could lead to UB.
This commit is contained in:
@@ -20,6 +20,9 @@ public:
|
||||
return Impl().ToHexString();
|
||||
}
|
||||
|
||||
protected:
|
||||
Hash() = default;
|
||||
|
||||
private:
|
||||
const T & Impl() const
|
||||
{
|
||||
|
||||
@@ -24,6 +24,9 @@ public:
|
||||
return Impl().Finish();
|
||||
}
|
||||
|
||||
protected:
|
||||
Hasher() = default;
|
||||
|
||||
private:
|
||||
const T & Impl() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user