In the C++ programming language, virtual inheritance is a kind of inheritance that solves some of the problems caused by multiple inheritance by clarifying ambiguity over which ancestor class members to use. It is used when inheritance is representing restrictions of a set rather than composition of parts. A multiply-inherited base class is denoted as virtual with the virtual keyword.

PropertyValue
dbpprop:abstract
  • In the C++ programming language, virtual inheritance is a kind of inheritance that solves some of the problems caused by multiple inheritance by clarifying ambiguity over which ancestor class members to use. It is used when inheritance is representing restrictions of a set rather than composition of parts. A multiply-inherited base class is denoted as virtual with the virtual keyword.
  • 仮想継承(かそうけいしょう、lang-en-short|Virtual inheritance}})とは、C++プログラミング言語における継承の一種で、多重継承によって生じる問題(菱形継承問題)を解決するもの。どの上位クラスのメンバーを使うか曖昧さが生じる部分で、明確化する。仮想継承は、部分の合成という意味での継承よりも、継承が上位クラスへの制限を表している場合に使われる。多重継承の基底クラスは、virtual というキーワードで仮想継承であることを指定される。
  • В языке программирования C++, виртуальное наследование (lang-en|virtual inheritance}}) это один из вариантов наследования, который нужен для решения некоторых проблем, порождаемых наличием возможности множественного наследования (особенно «проблемой ромба», путем разрешения неоднозначности того, методы которого из классов-предков необходимо использовать. Оно применяется в тех случаях, когда множественное наследование вместо предполагаемой полной композиции свойств классов-предков приводит к ограничению доступных наследуемых свойств вследствие неоднозначности. Базовый класс, наследуемый множественно, определяется виртуальным с помощью ключевого слова virtual.
dbpprop:hasPhotoCollection
rdfs:comment
  • In the C++ programming language, virtual inheritance is a kind of inheritance that solves some of the problems caused by multiple inheritance by clarifying ambiguity over which ancestor class members to use. It is used when inheritance is representing restrictions of a set rather than composition of parts. A multiply-inherited base class is denoted as virtual with the virtual keyword.
rdfs:label
  • Virtual inheritance
  • 仮想継承
  • Виртуальное наследование
owl:sameAs
skos:subject
foaf:page
is dbpprop:redirect of