mirror of
https://github.com/boostorg/core.git
synced 2025-11-29 13:50:10 +01:00
Add noinit_adapt() free function utility
This commit is contained in:
@@ -34,8 +34,7 @@ initialization of elements of a trivial type, which are later assigned values.
|
||||
|
||||
int main()
|
||||
{
|
||||
std::vector<int,
|
||||
boost::noinit_adaptor<std::allocator<int> > > v(5);
|
||||
std::vector<int, boost::noinit_adaptor<std::allocator<int> > > v(5);
|
||||
std::iota(v.begin(), v.end(), 1);
|
||||
}
|
||||
```
|
||||
@@ -136,6 +135,15 @@ const noinit_adaptor<U>& rhs) noexcept;`]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section Free functions]
|
||||
|
||||
[variablelist
|
||||
[[`template<class A> noinit_adaptor<A> noinit_adapt(const A& a) noexcept;`]
|
||||
[[variablelist
|
||||
[[Returns][`noinit_adaptor<A>(a)`.]]]]]]
|
||||
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
Reference in New Issue
Block a user