82 lines
4.5 KiB
HTML
82 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
|
|
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>std::allocator_arg</title>
|
|
<link rel="stylesheet" href="ext.css" />
|
|
<link rel="stylesheet" href="site_modules.css" />
|
|
</head>
|
|
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_memory_allocator_arg skin-cppreference2 action-view cpp-navbar">
|
|
<div id="cpp-content-base">
|
|
<div id="content"><a id="top"></a>
|
|
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::</span>allocator_arg</h1>
|
|
<div id="bodyContent">
|
|
<div id="contentSub"><span class="subpages">< <a href="cpp.html">cpp</a>‎ | <a href="cpp-memory.html">memory</a></span></div>
|
|
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
|
|
<table class="t-dcl-begin">
|
|
<tbody>
|
|
<tr class="t-dsc-header">
|
|
<td>
|
|
<div>定义于头文件 <code><a href="cpp-header-memory.html"><memory></a></code></div>
|
|
</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody class="t-dcl-rev">
|
|
<tr class="t-dcl t-since-cxx11 t-until-cxx17">
|
|
<td>
|
|
<div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a> allocator_arg <span class="sy1">=</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a><span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span></span></div>
|
|
</td>
|
|
<td class="t-dcl-nopad"></td>
|
|
<td><span class="t-mark-rev t-since-cxx11">(C++11 起)</span><br />
|
|
<span class="t-mark-rev t-until-cxx17">(C++17 前)</span></td>
|
|
</tr>
|
|
<tr class="t-dcl t-since-cxx17">
|
|
<td>
|
|
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">inline</span> <span class="kw4">constexpr</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a> allocator_arg <span class="sy1">=</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a><span class="br0">(</span><span class="br0">)</span><span class="sy4">;</span></span></div>
|
|
</td>
|
|
<td class="t-dcl-nopad"></td>
|
|
<td><span class="t-mark-rev t-since-cxx17">(C++17 起)</span></td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody>
|
|
<tr class="t-dcl-sep">
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><code>std::allocator_arg</code> 是 <span class="t-lc"><a href="cpp-memory-allocator_arg_t.html">std::allocator_arg_t</a></span> 类型常量,用于在调用点消歧义具分配器对象,例如 <span class="t-lc"><a href="cpp-utility-tuple.html">std::tuple</a></span> 、 <span class="t-lc"><a href="cpp-utility-functional-function.html">std::function</a></span> 、 <span class="t-lc"><a href="cpp-thread-promise.html">std::promise</a></span> 与 <span class="t-lc"><a href="cpp-thread-packaged_task.html">std::packaged_task</a></span> 的构造函数及成员函数的重载。</p>
|
|
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</span></h3>
|
|
<table class="t-dsc-begin">
|
|
<tr class="t-dsc">
|
|
<td>
|
|
<div class="t-dsc-member-div">
|
|
<div><a href="cpp-memory-allocator_arg_t.html"><span class="t-lines"><span>allocator_arg_t</span></span></a></div>
|
|
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
|
|
</div>
|
|
</td>
|
|
<td>标签类型,用于选择具分配器的构造函数重载<br />
|
|
<span class="t-mark">(类)</span></td>
|
|
</tr>
|
|
<tr class="t-dsc">
|
|
<td>
|
|
<div class="t-dsc-member-div">
|
|
<div><a href="cpp-memory-uses_allocator.html"><span class="t-lines"><span>uses_allocator</span></span></a></div>
|
|
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
|
|
</div>
|
|
</td>
|
|
<td>检查指定的类型是否支持使用分配器的构造<br />
|
|
<span class="t-mark">(类模板)</span></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|