mirror of
https://github.com/boostorg/callable_traits.git
synced 2026-02-27 04:52:19 +00:00
100 lines
7.6 KiB
HTML
100 lines
7.6 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>clear_args</title>
|
|
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
|
<link rel="home" href="../index.html" title="CallableTraits">
|
|
<link rel="up" href="../index.html" title="CallableTraits">
|
|
<link rel="prev" href="ref_can_invoke_constexpr.html" title="can_invoke_constexpr">
|
|
<link rel="next" href="ref_expand_args.html" title="expand_args">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
|
|
<td align="center"><a href="../../../index.html">Home</a></td>
|
|
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
|
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="ref_can_invoke_constexpr.html"><img src="../../src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../src/images/home.png" alt="Home"></a><a accesskey="n" href="ref_expand_args.html"><img src="../../src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
|
<a name="callable_traits.ref_clear_args"></a><a class="link" href="ref_clear_args.html" title="clear_args">clear_args</a>
|
|
</h2></div></div></div>
|
|
<pre class="programlisting"><span class="keyword">namespace</span> <code class="literal">callable_traits</code> <span class="special">{</span>
|
|
|
|
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
|
<span class="keyword">using</span> <span class="identifier">clear_args</span> <span class="special">=</span> <span class="comment">/* implementation-defined */</span><span class="special">;</span>
|
|
<span class="special">}</span>
|
|
</pre>
|
|
<h4>
|
|
<a name="callable_traits.ref_clear_args.h0"></a>
|
|
<span class="phrase"><a name="callable_traits.ref_clear_args.constraints"></a></span><a class="link" href="ref_clear_args.html#callable_traits.ref_clear_args.constraints">Constraints</a>
|
|
</h4>
|
|
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
|
|
<code class="computeroutput"><span class="identifier">T</span></code> must be a <a class="link" href="concepts.html#callable_traits.concepts.ref_signature" title="Signature"><span class="green">Signature</span></a>
|
|
</li></ul></div>
|
|
<h4>
|
|
<a name="callable_traits.ref_clear_args.h1"></a>
|
|
<span class="phrase"><a name="callable_traits.ref_clear_args.behavior"></a></span><a class="link" href="ref_clear_args.html#callable_traits.ref_clear_args.behavior">Behavior</a>
|
|
</h4>
|
|
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
|
<li class="listitem">
|
|
When the constraints are violated, a substitution failure occurs
|
|
</li>
|
|
<li class="listitem">
|
|
Otherwise, <code class="computeroutput"><span class="identifier">clear_args</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code>
|
|
is identical to <code class="computeroutput"><span class="identifier">T</span></code>, except
|
|
that the aliased type's parameter list is reduced to <code class="computeroutput"><span class="keyword">void</span></code>
|
|
</li>
|
|
</ul></div>
|
|
<h4>
|
|
<a name="callable_traits.ref_clear_args.h2"></a>
|
|
<span class="phrase"><a name="callable_traits.ref_clear_args.notes"></a></span><a class="link" href="ref_clear_args.html#callable_traits.ref_clear_args.notes">Notes</a>
|
|
</h4>
|
|
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
|
<li class="listitem">
|
|
Any C-style variadics on <code class="computeroutput"><span class="identifier">T</span></code>
|
|
are removed by <code class="computeroutput"><span class="identifier">clear_args</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code>
|
|
</li>
|
|
<li class="listitem">
|
|
Any enabled calling conventions are preserved on pointer types
|
|
</li>
|
|
</ul></div>
|
|
<h4>
|
|
<a name="callable_traits.ref_clear_args.h3"></a>
|
|
<span class="phrase"><a name="callable_traits.ref_clear_args.example"></a></span><a class="link" href="ref_clear_args.html#callable_traits.ref_clear_args.example">Example</a>
|
|
</h4>
|
|
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">callable_traits</span><span class="special">/</span><span class="identifier">clear_args</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
|
|
|
<span class="keyword">namespace</span> <span class="identifier">ct</span> <span class="special">=</span> <span class="identifier">callable_traits</span><span class="special">;</span>
|
|
|
|
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
|
|
|
|
<span class="keyword">using</span> <span class="identifier">f</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">);</span>
|
|
<span class="keyword">using</span> <span class="identifier">cleared</span> <span class="special">=</span> <span class="identifier">ct</span><span class="special">::</span><span class="identifier">clear_args</span><span class="special"><</span><span class="identifier">f</span><span class="special">>;</span>
|
|
<span class="keyword">using</span> <span class="identifier">expect</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">();</span>
|
|
<span class="keyword">static_assert</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special"><</span><span class="identifier">cleared</span><span class="special">,</span> <span class="identifier">expect</span><span class="special">>::</span><span class="identifier">value</span><span class="special">,</span> <span class="string">""</span><span class="special">);</span>
|
|
<span class="special">}</span>
|
|
</pre>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2016 Barrett Adair<p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE.md or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
|
</p>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="ref_can_invoke_constexpr.html"><img src="../../src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../src/images/home.png" alt="Home"></a><a accesskey="n" href="ref_expand_args.html"><img src="../../src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|