1 /* 2 * Copyright 2014 Google Inc. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef FRUIT_META_TRIPLET_H 18 #define FRUIT_META_TRIPLET_H 19 20 #include <fruit/impl/meta/basics.h> 21 22 namespace fruit { 23 namespace impl { 24 namespace meta { 25 26 template <typename First1, typename Second1, typename Third1> 27 struct Triplet { 28 using First = First1; 29 using Second = Second1; 30 using Third = Third1; 31 }; 32 33 struct ConsTriplet { 34 template <typename First, typename Second, typename Third> 35 struct apply { 36 using type = Triplet<First, Second, Third>; 37 }; 38 }; 39 40 struct GetThird { 41 template <typename T> 42 struct apply { 43 using type = typename T::Third; 44 }; 45 }; 46 47 } // namespace meta 48 } // namespace impl 49 } // namespace fruit 50 51 #endif // FRUIT_META_TRIPLET_H 52