From Jason Turner

[uninitialized.construct.value]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp3j7phjv4/{from.md → to.md} +29 -0
tmp/tmp3j7phjv4/{from.md → to.md} RENAMED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### `uninitialized_value_construct` <a id="uninitialized.construct.value">[[uninitialized.construct.value]]</a>
2
+
3
+ ``` cpp
4
+ template <class ForwardIterator>
5
+ void uninitialized_value_construct(ForwardIterator first, ForwardIterator last);
6
+ ```
7
+
8
+ *Effects:* Equivalent to:
9
+
10
+ ``` cpp
11
+ for (; first != last; ++first)
12
+ ::new (static_cast<void*>(addressof(*first)))
13
+ typename iterator_traits<ForwardIterator>::value_type();
14
+ ```
15
+
16
+ ``` cpp
17
+ template <class ForwardIterator, class Size>
18
+ ForwardIterator uninitialized_value_construct_n(ForwardIterator first, Size n);
19
+ ```
20
+
21
+ *Effects:* Equivalent to:
22
+
23
+ ``` cpp
24
+ for (; n>0; (void)++first, --n)
25
+ ::new (static_cast<void*>(addressof(*first)))
26
+ typename iterator_traits<ForwardIterator>::value_type();
27
+ return first;
28
+ ```
29
+