Skip to content

Commit

Permalink
Inherit virtually from Attributable in some places
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Oct 12, 2022
1 parent 6d33700 commit d4803ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/openPMD/backend/BaseRecordComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace openPMD
{
namespace internal
{
class BaseRecordComponentData : public AttributableData
class BaseRecordComponentData : virtual public AttributableData
{
public:
/**
Expand All @@ -59,7 +59,7 @@ namespace internal
};
} // namespace internal

class BaseRecordComponent : public Attributable
class BaseRecordComponent : virtual public Attributable
{
template <typename T, typename T_key, typename T_container>
friend class Container;
Expand Down
4 changes: 2 additions & 2 deletions include/openPMD/backend/Container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace internal
typename T,
typename T_key = std::string,
typename T_container = std::map<T_key, T> >
class ContainerData : public AttributableData
class ContainerData : virtual public AttributableData
{
public:
using InternalContainer = T_container;
Expand Down Expand Up @@ -128,7 +128,7 @@ template <
typename T,
typename T_key = std::string,
typename T_container = std::map<T_key, T> >
class Container : public Attributable
class Container : virtual public Attributable
{
static_assert(
std::is_base_of<Attributable, T>::value,
Expand Down

0 comments on commit d4803ca

Please sign in to comment.