Open3D (C++ API)  0.17.0
Overload.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 namespace open3d {
11 namespace utility {
12 
24 template <typename... Ts>
25 struct Overloaded;
26 
27 template <typename T1, typename... Ts>
28 struct Overloaded<T1, Ts...> : T1, Overloaded<Ts...> {
29  Overloaded(T1 t1, Ts... ts) : T1(t1), Overloaded<Ts...>(ts...) {}
30 
31  using T1::operator();
33 };
34 
35 template <typename T1>
36 struct Overloaded<T1> : T1 {
37  Overloaded(T1 t1) : T1(t1) {}
38 
39  using T1::operator();
40 };
41 
54 template <typename... Ts>
55 Overloaded<Ts...> Overload(Ts... ts) {
56  return Overloaded<Ts...>(ts...);
57 }
58 
59 } // namespace utility
60 } // namespace open3d
Overloaded< Ts... > Overload(Ts... ts)
Definition: Overload.h:55
Definition: PinholeCameraIntrinsic.cpp:16
Overloaded(T1 t1, Ts... ts)
Definition: Overload.h:29
Overloaded(T1 t1)
Definition: Overload.h:37
Definition: Overload.h:25