ATLAS Offline Software
Loading...
Searching...
No Matches
TopBase.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef ATHENAKERNEL_TOPBASE_H
14#define ATHENAKERNEL_TOPBASE_H
15
16
18#include <type_traits>
19
20
21namespace SG {
22
23
36template <class T>
37struct TopBase
38{
40 static const bool has_base = !std::is_same<Base1, SG::NoBase>::value;
41 typedef typename std::conditional<has_base,
42 typename TopBase<Base1>::type,
44};
45
46
47template <>
49{
51};
52
53
54} // namespace SG
55
56
57#endif // not ATHENAKERNEL_TOPBASE_H
Provide an interface for finding inheritance information at run time.
Forward declaration.
NoBase Base1
Definition Bases.h:82
Marker to indicate a nonexistent base class.
Definition Bases.h:68
Calculate topmost base accessible via SG_BASES.
Definition TopBase.h:38
std::conditional< has_base, typenameTopBase< Base1 >::type, T >::type type
Definition TopBase.h:43
SG::Bases< T >::bases::Base1 Base1
Definition TopBase.h:39
static const bool has_base
Definition TopBase.h:40