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  template <typename T>
21  struct handle_allowed<T, std::enable_if_t<!T::service_handle_allowed>>
22  : std::false_type {};
23 
24  template <typename T>
26  }
27 }
28 
29 #endif /* art_Framework_Services_Registry_detail_ServiceHandleAllowed_h */
30 
31 // Local Variables:
32 // mode: c++
33 // End:
bool constexpr handle_allowed_v
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
double T
Definition: Xdiff_gwt.C:5