1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>require_concept</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../reference.html" title="Reference"> 9<link rel="prev" href="require.html" title="require"> 10<link rel="next" href="require_concept_result.html" title="require_concept_result"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 15<td align="center"><a href="../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="require.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="require_concept_result.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_asio.reference.require_concept"></a><a class="link" href="require_concept.html" title="require_concept">require_concept</a> 28</h3></div></div></div> 29<p> 30 <a class="indexterm" name="boost_asio.indexterm.require_concept"></a> 31A customisation point 32 that applies a concept-enforcing property to an object. 33 </p> 34<pre class="programlisting">constexpr unspecified require_concept = unspecified; 35</pre> 36<p> 37 The name <code class="computeroutput">require_concept</code> denotes a customization point object. 38 The expression <code class="computeroutput">boost::asio::require_concept(E, P)</code> for some subexpressions 39 <code class="computeroutput">E</code> and <code class="computeroutput">P</code> (with types <code class="computeroutput">T = decay_t<decltype(E)></code> 40 and <code class="computeroutput">Prop = decay_t<decltype(P)></code>) is expression-equivalent 41 to: 42 </p> 43<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 44<li class="listitem"> 45 If <code class="computeroutput">is_applicable_property_v<T, Prop> && Prop::is_requirable_concept</code> 46 is not a well-formed constant expression with value <code class="computeroutput">true</code>, 47 <code class="computeroutput">boost::asio::require_concept(E, P)</code> is ill-formed. 48 </li> 49<li class="listitem"> 50 Otherwise, <code class="computeroutput">E</code> if the expression <code class="computeroutput">Prop::template static_query_v<T> 51 == Prop::value()</code> is a well-formed constant expression with value 52 <code class="computeroutput">true</code>. 53 </li> 54<li class="listitem"> 55 Otherwise, <code class="computeroutput">(E).require_concept(P)</code> if the expression <code class="computeroutput">(E).require_concept(P)</code> 56 is well-formed. 57 </li> 58<li class="listitem"> 59 Otherwise, <code class="computeroutput">require_concept(E, P)</code> if the expression <code class="computeroutput">require_concept(E, 60 P)</code> is a valid expression with overload resolution performed in 61 a context that does not include the declaration of the <code class="computeroutput">require_concept</code> 62 customization point object. 63 </li> 64<li class="listitem"> 65 Otherwise, <code class="computeroutput">boost::asio::require_concept(E, P)</code> is ill-formed. 66 </li> 67</ul></div> 68<h5> 69<a name="boost_asio.reference.require_concept.h0"></a> 70 <span class="phrase"><a name="boost_asio.reference.require_concept.requirements"></a></span><a class="link" href="require_concept.html#boost_asio.reference.require_concept.requirements">Requirements</a> 71 </h5> 72<p> 73 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/require_concept.hpp</code> 74 </p> 75<p> 76 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code> 77 </p> 78</div> 79<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 80<td align="left"></td> 81<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 82 Kohlhoff<p> 83 Distributed under the Boost Software License, Version 1.0. (See accompanying 84 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 85 </p> 86</div></td> 87</tr></table> 88<hr> 89<div class="spirit-nav"> 90<a accesskey="p" href="require.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="require_concept_result.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 91</div> 92</body> 93</html> 94