tti_enclosing_type.html 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Enclosing Type</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="../index.html" title="Chapter&#160;1.&#160;The Type Traits Introspection Library">
  8. <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;The Type Traits Introspection Library">
  9. <link rel="prev" href="tti_func_sig.html" title="Nested Types and Function Signatures">
  10. <link rel="next" href="tti_usingMM.html" title="An example using the Macro Metafunctions">
  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="tti_func_sig.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tti_usingMM.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h2 class="title" style="clear: both">
  27. <a name="the_type_traits_introspection_library.tti_enclosing_type"></a><a class="link" href="tti_enclosing_type.html" title="Enclosing Type">Enclosing
  28. Type</a>
  29. </h2></div></div></div>
  30. <p>
  31. The enclosing type you introspect with TTI must be a valid type at the point
  32. in which you invoke the macro metafunction. If it is not a valid type at that
  33. point you will receive a compiler error.
  34. </p>
  35. <p>
  36. If the enclosing type is a valid type but is not a class type you will not
  37. receive a compiler error, but the result of the introspection will always return
  38. 'false' or, in the case of the metafunction generated by BOOST_TTI_MEMBER_TYPE,
  39. will always return the marker type.
  40. </p>
  41. <p>
  42. When using the macro metafunctions generated by BOOST_TTI_HAS_MEMBER_DATA and
  43. BOOST_TTI_HAS_MEMBER_FUNCTION the first template parameter may be an enclosing
  44. type or a pointer to member data or member function respectively. In each of
  45. these cases TTI can distinguish between the two possibilities and only if the
  46. first template parameter is an enclosing type, once again if it is a valid
  47. type but not a class type you will not receive a compiler error but the result
  48. of the introspection will return 'false'.
  49. </p>
  50. </div>
  51. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  52. <td align="left"></td>
  53. <td align="right"><div class="copyright-footer">Copyright &#169; 2011-2013 Tropic Software
  54. East Inc<p>
  55. Distributed under the Boost Software License, Version 1.0. (See accompanying
  56. 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>)
  57. </p>
  58. </div></td>
  59. </tr></table>
  60. <hr>
  61. <div class="spirit-nav">
  62. <a accesskey="p" href="tti_func_sig.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tti_usingMM.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
  63. </div>
  64. </body>
  65. </html>