mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix common_type: support C++14 version
This commit is contained in:
parent
bb0098ce09
commit
1bb9336d34
17 changed files with 191 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue