LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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::detail
{
16
template
<
typename
T,
typename
=
void
>
17
struct
handle_allowed
: std::true_type {};
18
19
template
<
typename
T>
20
struct
handle_allowed
<T,
std
::enable_if_t<!T::service_handle_allowed>>
21
: std::false_type {};
22
23
template
<
typename
T>
24
bool
constexpr
handle_allowed_v
{
handle_allowed<T>::value
};
25
}
26
27
#endif
/* art_Framework_Services_Registry_detail_ServiceHandleAllowed_h */
28
29
// Local Variables:
30
// mode: c++
31
// End:
art::detail::handle_allowed_v
bool constexpr handle_allowed_v
Definition:
ServiceHandleAllowed.h:24
std
STL namespace.
art::detail::handle_allowed
Definition:
ServiceHandleAllowed.h:17
art::detail
Definition:
AllowedConfiguration.h:76
art
Framework
Services
Registry
detail
ServiceHandleAllowed.h
Generated on Thu May 2 2024 20:59:30 for LArSoft by
1.8.11