| 1 | /* |
| 2 | * Copyright 2002 - 2016, The libsigc++ Development Team |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | */ |
| 19 | #ifndef SIGC_TYPE_TRAIT_H |
| 20 | #define SIGC_TYPE_TRAIT_Hcxx . . $ `sigc++/type_traits.h:20:9`! |
| 21 | |
| 22 | #include <sigc++config.h>cxx . . $ `<file>/config.h`/ |
| 23 | |
| 24 | namespace sigccxx . . $ sigc/ |
| 25 | { |
| 26 | |
| 27 | template<typename T_type> |
| 28 | struct type_traitcxx . . $ sigc/type_trait# |
| 29 | { |
| 30 | using passcxx . . $ sigc/type_trait#pass# = T_type&; |
| 31 | using takecxx . . $ sigc/type_trait#take# = const T_type&; |
| 32 | }; |
| 33 | |
| 34 | template<typename T_type, int N> |
| 35 | struct type_traitcxx . . $ sigc/type_trait#<T_type[N]> |
| 36 | { |
| 37 | using passcxx . . $ sigc/type_trait#pass# = T_type*&; |
| 38 | using takecxx . . $ sigc/type_trait#take# = const T_type*&; |
| 39 | }; |
| 40 | |
| 41 | template<typename T_type> |
| 42 | struct type_traitcxx . . $ sigc/type_trait#<T_type&> |
| 43 | { |
| 44 | using passcxx . . $ sigc/type_trait#pass# = T_type&; |
| 45 | using takecxx . . $ sigc/type_trait#take# = T_type&; |
| 46 | }; |
| 47 | |
| 48 | template<typename T_type> |
| 49 | struct type_traitcxx . . $ sigc/type_trait#<const T_type&> |
| 50 | { |
| 51 | using passcxx . . $ sigc/type_trait#pass# = const T_type&; |
| 52 | using takecxx . . $ sigc/type_trait#take# = const T_type&; |
| 53 | }; |
| 54 | |
| 55 | template<typename T_type> |
| 56 | struct type_traitcxx . . $ sigc/type_trait#<T_type&&> |
| 57 | { |
| 58 | using passcxx . . $ sigc/type_trait#pass# = T_type&&; |
| 59 | using takecxx . . $ sigc/type_trait#take# = T_type&&; |
| 60 | }; |
| 61 | |
| 62 | template<> |
| 63 | struct type_traitcxx . . $ sigc/type_trait#<void> |
| 64 | { |
| 65 | using passcxx . . $ sigc/type_trait#pass# = void; |
| 66 | using takecxx . . $ sigc/type_trait#take# = void; |
| 67 | }; |
| 68 | |
| 69 | template<typename T> |
| 70 | using type_trait_pass_tcxx . . $ sigc/type_trait_pass_t# = typename type_traitcxx . . $ sigc/type_trait#<T>::pass; |
| 71 | |
| 72 | template<typename T> |
| 73 | using type_trait_take_tcxx . . $ sigc/type_trait_take_t# = typename type_traitcxx . . $ sigc/type_trait#<T>::take; |
| 74 | |
| 75 | } /* namespace sigc */ |
| 76 | |
| 77 | #endif /* SIGC_TYPE_TRAIT_H */ |