fw4spl
remove_last_arg.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 #ifndef __FWCOM_UTIL_REMOVE_LAST_ARG_HPP__
7 #define __FWCOM_UTIL_REMOVE_LAST_ARG_HPP__
8 
9 namespace fwCom
10 {
11 
12 
13 namespace util
14 {
15 
24 template < typename F >
26 
27 
29 template < typename R, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7,
30  typename A8, typename A9 >
31 struct remove_last_arg< R(A1, A2, A3, A4, A5, A6, A7, A8, A9) >
32 {
33  typedef R type (A1, A2, A3, A4, A5, A6, A7, A8);
34 };
35 
36 
38 template < typename R, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7,
39  typename A8 >
40 struct remove_last_arg< R(A1, A2, A3, A4, A5, A6, A7, A8) >
41 {
42  typedef R type (A1, A2, A3, A4, A5, A6, A7);
43 };
44 
45 
47 template < typename R, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7 >
48 struct remove_last_arg< R(A1, A2, A3, A4, A5, A6, A7) >
49 {
50  typedef R type (A1, A2, A3, A4, A5, A6);
51 };
52 
53 
55 template < typename R, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6 >
56 struct remove_last_arg< R(A1, A2, A3, A4, A5, A6) >
57 {
58  typedef R type (A1, A2, A3, A4, A5);
59 };
60 
61 
63 template < typename R, typename A1, typename A2, typename A3, typename A4, typename A5 >
64 struct remove_last_arg< R(A1, A2, A3, A4, A5) >
65 {
66  typedef R type (A1, A2, A3, A4);
67 };
68 
69 
71 template < typename R, typename A1, typename A2, typename A3, typename A4 >
72 struct remove_last_arg< R(A1, A2, A3, A4) >
73 {
74  typedef R type (A1, A2, A3);
75 };
76 
77 
79 template < typename R, typename A1, typename A2, typename A3 >
80 struct remove_last_arg< R(A1, A2, A3) >
81 {
82  typedef R type (A1, A2);
83 };
84 
86 template < typename R, typename A1, typename A2 >
87 struct remove_last_arg< R(A1, A2) >
88 {
89  typedef R type (A1);
90 };
91 
93 template < typename R, typename A1 >
94 struct remove_last_arg< R(A1) >
95 {
96  typedef R type ();
97 };
98 
99 
101 template < typename R >
102 struct remove_last_arg< R() >
103 {
104  typedef R type ();
105 };
106 
107 
108 } //namespace util
109 
110 } //namespace fwCom
111 
112 #endif /* __FWCOM_UTIL_REMOVE_LAST_ARG_HPP__ */
113 
114 
Last argument removal class. Removes the last argument type from a function type. If the given functi...
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30