fix common_type: support C++14 version

This commit is contained in:
bolero-MURAKAMI 2014-03-29 09:16:43 +09:00
parent bb0098ce09
commit 1bb9336d34
17 changed files with 191 additions and 10 deletions

View file

@ -13,6 +13,7 @@
#include <sprout/utility/forward.hpp>
#include <sprout/type/type_tuple.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/identity.hpp>
#include <sprout/type_traits/enabler_if.hpp>
namespace sprout {
@ -54,6 +55,23 @@ namespace sprout {
typename sprout::types::detail::tuple_take<I, sprout::types::type_tuple<Args...> >::type
>::eval(SPROUT_FORWARD(Args, args)...);
}
//
// head_element
//
template<typename Head, typename... Tail>
struct head_element
: public sprout::identity<Head>
{};
//
// head_get
//
template<typename Head, typename... Tail>
inline SPROUT_CONSTEXPR Head&&
head_get(Head&& head, Tail&&... tail) {
return SPROUT_FORWARD(Head, head);
}
} // namespace sprout
#endif // #ifndef SPROUT_UTILITY_PACK_HPP