1<?xml version="1.0" ?> 2<!-- 3 Copyright 2008 Eric Niebler 4 5 Distributed under the Boost 6 Software License, Version 1.0. (See accompanying 7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 --> 9<concept name="PolymorphicFunctionObject" category="utility"> 10 <param name="Fn" role="polymorphic-function-object-type" /> 11 12 <models-sentence> 13 The type <arg num="1" /> must be a model of <self/>. 14 </models-sentence> 15 16 <description> 17 <para> 18 A type that can be called and that follows the TR1 ResultOf 19 protocol for return type calculation. 20 </para> 21 </description> 22 23 <notation variables="fn"> 24 <sample-value> 25 <type name="Fn" /> 26 </sample-value> 27 </notation> 28 29 <notation variables="a0,...an"> 30 <sample-value> 31 <type name="A0,...An" /> 32 </sample-value> 33 </notation> 34 35 <associated-type name="result_type"> 36 <get-member-type name="type"> 37 <apply-template name="result_of"> 38 <apply-function name="Fn"> 39 <type name="A0,...An" /> 40 </apply-function> 41 </apply-template> 42 </get-member-type> 43 <description> 44 <simpara>The result of calling the Polymorphic Function Object.</simpara> 45 </description> 46 </associated-type> 47 48 <valid-expression name="Function Call"> 49 <apply-function name="fn"> 50 <sample-value> 51 <type name="A0,...An" /> 52 </sample-value> 53 </apply-function> 54 <return-type> 55 <require-same-type testable="yes"> 56 <type name="result_type"/> 57 </require-same-type> 58 </return-type> 59 <semantics>Calls the function object.</semantics> 60 </valid-expression> 61 62 <example-model> 63 <type name="std::plus<int>" /> 64 </example-model> 65 66</concept> 67