LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
is_handle.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Common_detail_is_handle_h
2 #define canvas_Persistency_Common_detail_is_handle_h
3 
4 #include <type_traits>
5 
6 namespace art::detail {
7  template <typename T, typename = void>
8  struct is_handle : std::false_type {};
9 
10  template <typename T>
11  struct is_handle<T, std::void_t<typename T::HandleTag>> : std::true_type {};
12 
13  template <typename T>
14  constexpr bool is_handle_v = is_handle<T>::value;
15 
16  template <typename T, typename U>
17  constexpr bool are_handles_v{is_handle_v<T> && is_handle_v<U>};
18 }
19 #endif /* canvas_Persistency_Common_detail_is_handle_h */
20 
21 // Local Variables:
22 // mode: c++
23 // End:
STL namespace.
constexpr bool is_handle_v
Definition: is_handle.h:14
constexpr bool are_handles_v
Definition: is_handle.h:17