added operator= for initializer list
This commit is contained in:
parent
3112fd15f9
commit
a2de08b14d
|
|
@ -65,6 +65,7 @@ namespace cc {
|
|||
//constexpr const_vector<T, N>& operator=(const value_type (&array)[N]) noexcept; // not needed as functionally equivalent to templated overload
|
||||
template <std::size_t N2>
|
||||
constexpr const_vector<T, N>& operator=(const value_type (&array)[N2]) noexcept;
|
||||
constexpr const_vector<T, N>& operator=(std::initializer_list<value_type> values) noexcept;
|
||||
|
||||
constexpr void assign(size_type count, const value_type& value) noexcept;
|
||||
template<std::input_iterator InputIt>
|
||||
|
|
@ -300,6 +301,13 @@ namespace cc {
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
constexpr const_vector<T, N> &const_vector<T, N>::operator=(std::initializer_list<value_type> values) noexcept
|
||||
{
|
||||
assign(std::move(values));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
constexpr void const_vector<T, N>::assign(const_vector::size_type count, const value_type &value) noexcept
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue