Function assign

Summary

#include <include/EASTL/deque.h>

(1) void assign(size_type n, const value_type &value)

(2) void assign(std::initializer_list< value_type > ilist)

(3) template <typename InputIterator>
    void assign(InputIterator first, InputIterator last)

Function overload

Synopsis

#include <include/EASTL/deque.h>

void assign(size_type n, const value_type &value)

Description

No description yet.

Source

Lines 1328-1332 in include/EASTL/deque.h. Line 392 in include/EASTL/deque.h.

template <typename T, typename Allocator, unsigned kDequeSubarraySize>
inline void deque<T, Allocator, kDequeSubarraySize>::assign(size_type n, const value_type& value)
{
    DoAssignValues(n, value);
}

Synopsis

#include <include/EASTL/deque.h>

void assign(std::initializer_list< value_type > ilist)

Description

No description yet.

Source

Lines 1335-1339 in include/EASTL/deque.h. Line 393 in include/EASTL/deque.h.

template <typename T, typename Allocator, unsigned kDequeSubarraySize>
inline void deque<T, Allocator, kDequeSubarraySize>::assign(std::initializer_list<value_type> ilist)
{
    DoAssign(ilist.begin(), ilist.end(), false_type());
}

Synopsis

#include <include/EASTL/deque.h>

template <typename InputIterator>
void assign(InputIterator first, InputIterator last)

Description

It turns out that the C++ std::deque specifies a two argument version of assign that takes (int size, int value). These are not iterators, so we need to do a template compiler trick to do the right thing.

Source

Lines 1345-1350 in include/EASTL/deque.h. Line 396 in include/EASTL/deque.h.

template <typename T, typename Allocator, unsigned kDequeSubarraySize>
template <typename InputIterator>
inline void deque<T, Allocator, kDequeSubarraySize>::assign(InputIterator first, InputIterator last)
{
    DoAssign(first, last, is_integral<InputIterator>());
}





Add Discussion as Guest

Log in