add convert_array, to_string_array

This commit is contained in:
bolero-MURAKAMI 2013-08-03 20:03:13 +09:00
parent d8cb7a7887
commit f8bfa6eeba
4 changed files with 56 additions and 0 deletions

View file

@ -34,6 +34,15 @@ namespace sprout {
> type;
return type{{sprout::forward<Types>(args)...}};
}
//
// convert_array
//
template<typename T, typename Converter, typename... Types>
inline SPROUT_CONSTEXPR sprout::array<T, sizeof...(Types)>
convert_array(Converter&& conv, Types&&... args) {
return sprout::make_array<T>(sprout::forward<Converter>(conv)(sprout::forward<Types>(args))...);
}
} // namespace sprout
#endif // #ifndef SPROUT_ARRAY_MAKE_ARRAY_HPP