mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add array constexpr member-functions fill, assign
This commit is contained in:
parent
d76d714816
commit
a660478548
10 changed files with 110 additions and 70 deletions
|
@ -252,31 +252,11 @@ namespace sprout {
|
|||
// swap
|
||||
//
|
||||
template<typename... Types>
|
||||
inline void swap(
|
||||
sprout::variant<Types...>& lhs,
|
||||
sprout::variant<Types...>& rhs
|
||||
) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
|
||||
inline void swap(sprout::variant<Types...>& lhs, sprout::variant<Types...>& rhs)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
namespace std {
|
||||
//
|
||||
// tuple_size
|
||||
//
|
||||
template<typename... Types>
|
||||
struct tuple_size<sprout::variant<Types...> >
|
||||
: public std::tuple_size<typename sprout::variant<Types...>::tuple_type>
|
||||
{};
|
||||
|
||||
//
|
||||
// tuple_element
|
||||
//
|
||||
template<std::size_t I, typename... Types>
|
||||
struct tuple_element<I, sprout::variant<Types...> >
|
||||
: public std::tuple_element<I, typename sprout::variant<Types...>::tuple_type>
|
||||
{};
|
||||
} // namespace std
|
||||
|
||||
#endif // #ifndef SPROUT_VARIANT_VARIANT_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue