LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ServiceHandleAllowed.h
Go to the documentation of this file.
1
#ifndef art_Framework_Services_Registry_detail_ServiceHandleAllowed_h
2
#define art_Framework_Services_Registry_detail_ServiceHandleAllowed_h
3
4
// ======================================================================
5
// ServiceHandleAllowed is a compile-time trait that checks if a
6
// 'service_handle_allowed' constexpr boolean member is present in a
7
// service's class definition *and* has been set to false. If set to
8
// 'false', then the 'handle_allowed_v<T>' value is 'false'. If a
9
// 'service_handle_allowed' variable is not present in a service's
10
// definition, then the 'handle_allowed_v<T>' value is 'true'.
11
// ======================================================================
12
13
#include <type_traits>
14
15
namespace
art
{
16
namespace
detail {
17
template
<
typename
T,
typename
=
void
>
18
struct
handle_allowed
: std::true_type {
19
};
20
21
template
<
typename
T>
22
struct
handle_allowed
<T,
std
::enable_if_t<!T::service_handle_allowed>>
23
: std::false_type {
24
};
25
26
template
<
typename
T>
27
bool
constexpr
handle_allowed_v
{
handle_allowed<T>::value
};
28
}
29
}
30
31
#endif
/* art_Framework_Services_Registry_detail_ServiceHandleAllowed_h */
32
33
// Local Variables:
34
// mode: c++
35
// End:
art::detail::handle_allowed_v
bool constexpr handle_allowed_v
Definition:
ServiceHandleAllowed.h:27
std
STL namespace.
art::detail::handle_allowed
Definition:
ServiceHandleAllowed.h:18
art
HLT enums.
Definition:
ServiceProviderWrappers.h:36
art
Framework
Services
Registry
detail
ServiceHandleAllowed.h
Generated on Thu Jul 26 2018 13:09:42 for LArSoft by
1.8.11