deduction guides for std::indirect

来自cppreference.com


 
 
内存管理库
分配器
内存资源
未初始化存储 (C++20 前*)
垃圾收集器支持 (C++23 前)
 
 
在标头 <memory> 定义
template< class Value >
indirect( Value ) -> indirect<Value>;
(1) (C++26 起)
template< class Alloc, class Value >
indirect( std::allocator_arg_t, Alloc, Value )
    -> indirect<Value, typename std::allocator_traits<Alloc>::
                                    template rebind_alloc<Value>>;
(2) (C++26 起)
1)std::indirect 提供此推导指引,以允许从单个值推导。
2)std::indirect 提供此推导指引,以允许从值类型与 Value 不同的分配器推导。

示例

Morty Proxy This is a proxified and sanitized view of the page, visit original site.