X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/5224670fe4e903bd507eabd486f8723353893bfa..02967a43024ce81912cd1ec96a800397457f8066:/types.h diff --git a/types.h b/types.h index 797ccf0..53f496d 100644 --- a/types.h +++ b/types.h @@ -117,8 +117,8 @@ operator<<(std::ostream & o, const A & a) { // }; #define MEMBERS(...) \ -inline auto _tuple_() -> decltype(std::tie(__VA_ARGS__)) { return std::tie(__VA_ARGS__); } \ -inline auto _tuple_() const -> decltype(std::tie(__VA_ARGS__)) { return std::tie(__VA_ARGS__); } +inline auto _tuple_() { return std::tie(__VA_ARGS__); } \ +inline auto _tuple_() const { return std::tie(__VA_ARGS__); } // struct ordering and comparison operations; requires the use of MEMBERS. // usage: @@ -133,24 +133,6 @@ LEXICOGRAPHIC_OPERATOR(_c_, <) LEXICOGRAPHIC_OPERATOR(_c_, <=) \ LEXICOGRAPHIC_OPERATOR(_c_, >) LEXICOGRAPHIC_OPERATOR(_c_, >=) \ LEXICOGRAPHIC_OPERATOR(_c_, ==) LEXICOGRAPHIC_OPERATOR(_c_, !=) -// Tuple indexing in variadic templates. -// This implementation of tuple_indices is redistributed under the MIT -// License as an insubstantial portion of the LLVM compiler infrastructure. - -template struct tuple_indices {}; -template struct make_indices_imp; -template struct make_indices_imp, E> { - typedef typename make_indices_imp, E>::type type; -}; -template struct make_indices_imp, E> { - typedef tuple_indices type; -}; -template struct make_tuple_indices { - typedef typename make_indices_imp, E>::type type; -}; - -#define TUPLE_INDICES(_ArgPack_) typename make_tuple_indices::type() - // Template parameter pack expansion is not allowed in certain contexts, but // brace initializers (for instance, calls to constructors of empty structs) // are fair game.