最終更新日
:2025/11/29
diamond problem
名詞
(object-oriented
programming)
The
ambiguity
that
arises
when
two
classes
B
and
C
inherit
from
A,
and
a
further
class
D
inherits
from
both
B
and
C,
so
that
if
there
is
a
method
in
A
that
B
and/or
C
has
overridden,
and
D
does
not
override
it,
it
is
unclear
which
version
of
the
method
D
should
inherit.
日本語の意味
オブジェクト指向プログラミングにおいて、クラスの多重継承により生じる曖昧性の問題。例えば、クラスAを継承したクラスBとクラスCがあり、さらにそれらを継承するクラスDが存在する場合、もしAのメソッドがBまたはCでオーバーライドされ、Dではオーバーライドが行われていないならば、Dがどのバージョンのメソッドを継承すべきかが不明確になる現象を指す。
意味(1)
(object-oriented
programming)
The
ambiguity
that
arises
when
two
classes
B
and
C
inherit
from
A,
and
a
further
class
D
inherits
from
both
B
and
C,
so
that
if
there
is
a
method
in
A
that
B
and/or
C
has
overridden,
and
D
does
not
override
it,
it
is
unclear
which
version
of
the
method
D
should
inherit.
( plural )
復習用の問題
(object-oriented programming) The ambiguity that arises when two classes B and C inherit from A, and a further class D inherits from both B and C, so that if there is a method in A that B and/or C has overridden, and D does not override it, it is unclear which version of the method D should inherit.
音声機能が動作しない場合はこちらをご確認ください
正解を見る
diamond problem
When designing multiple inheritance in C++, you must carefully handle the diamond problem to avoid duplicated base class initialization and ambiguous method calls.
正解を見る
When designing multiple inheritance in C++, you must carefully handle the diamond problem to avoid duplicated base class initialization and ambiguous method calls.
音声機能が動作しない場合はこちらをご確認ください
英語 - 英語
項目の編集設定
- 項目の編集権限を持つユーザー - すべてのユーザー
- 項目の新規作成を審査する
- 項目の編集を審査する
- 項目の削除を審査する
- 重複の恐れのある項目名の追加を審査する
- 項目名の変更を審査する
- 審査に対する投票権限を持つユーザー - 編集者
- 決定に必要な投票数 - 1
例文の編集設定
- 例文の編集権限を持つユーザー - すべてのユーザー
- 例文の削除を審査する
- 審査に対する投票権限を持つユーザー - 編集者
- 決定に必要な投票数 - 1
問題の編集設定
- 問題の編集権限を持つユーザー - すべてのユーザー
- 審査に対する投票権限を持つユーザー - 編集者
- 決定に必要な投票数 - 1