mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
add convert_array, to_string_array
This commit is contained in:
parent
d8cb7a7887
commit
f8bfa6eeba
4 changed files with 56 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue