-
Notifications
You must be signed in to change notification settings - Fork 83
/
overload.h
30 lines (22 loc) · 762 Bytes
/
overload.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// This file is part of KWIVER, and is distributed under the
// OSI-approved BSD 3-Clause License. See top-level LICENSE file or
// https://github.com/Kitware/kwiver/blob/master/LICENSE for details.
#ifndef KWIVER_VITAL_OVERLOAD_H
#define KWIVER_VITAL_OVERLOAD_H
namespace kwiver {
namespace vital {
// ----------------------------------------------------------------------------
template < class... Args, class T, class R >
constexpr inline
auto
overload( R ( T::* m )( Args... ) ) -> decltype( m )
{ return m; }
// ----------------------------------------------------------------------------
template < class T, class R >
constexpr inline
auto
overload( R ( T::* m )() ) -> decltype( m )
{ return m; }
} // namespace vital
} // namespace kwiver
#endif