Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
selector_signature_check.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file selector_signature_check.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
12 #include <type_traits>
13 
14 namespace Fatras {
15 
27 namespace detail {
28 
29 namespace {
30 template <typename T, typename detector_t, typename particle_t,
31  typename = decltype(
32  std::declval<T>().operator()(std::declval<const detector_t &>(),
33  std::declval<const particle_t &>()))>
34 
35 std::true_type test_selector_list(int);
36 
37 template <typename, typename, typename> std::false_type test_selector_list(...);
38 
39 template <typename T, typename detector_t, typename particle_t>
40 struct selector_list_signature_check
41  : decltype(test_selector_list<T, detector_t, particle_t>(0)) {};
42 
43 } // end of anonymous namespace
44 
45 template <typename T, typename detector_t, typename particle_t>
48 
49 } // namespace detail
50 
51 } // namespace Fatras