Made MixinMemoryView constructor private and only callable by its implementation.
This commit is contained in:
parent
4a3895c0ad
commit
7d4c782b0f
@ -41,6 +41,9 @@ concept RWMemoryViewable = MemoryViewable<T> && requires(T& object)
|
|||||||
template<typename TConcrete>
|
template<typename TConcrete>
|
||||||
class MixinMemoryView
|
class MixinMemoryView
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
MixinMemoryView() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr bool WRITABLE = requires(TConcrete& object) { { object.data() } -> std::convertible_to<void*>; };
|
static constexpr bool WRITABLE = requires(TConcrete& object) { { object.data() } -> std::convertible_to<void*>; };
|
||||||
|
|
||||||
@ -82,6 +85,8 @@ private:
|
|||||||
{
|
{
|
||||||
return static_cast<const TConcrete*>(this)->byteSize();
|
return static_cast<const TConcrete*>(this)->byteSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
friend TConcrete;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MemoryView : public MixinMemoryView<MemoryView>
|
class MemoryView : public MixinMemoryView<MemoryView>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user