tti_why.qbk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. [/
  2. (C) Copyright Edward Diener 2011
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:tti_reason Why the TTI Library ?]
  8. In the Boost Type Traits library there is compile time functionality for
  9. querying information about a C++ type. This information is very useful
  10. during template metaprogramming and forms the basis, along with the
  11. constructs of the Boost MPL library, and some other compile time
  12. libraries, for much of the template metaprogramming in Boost.
  13. One area which is mostly missing in the Type Traits library is the ability
  14. to determine what C++ inner elements are part of a type, where the inner
  15. element may be a nested type, function or data member, static function or
  16. static data member, or class template.
  17. There has been some of this functionality in Boost, both in already existing
  18. libraries and in libraries on which others have worked but which were
  19. never submitted for acceptance into Boost. An example with an existing Boost
  20. library is Boost MPL, where there is functionality, in the form of macros and metafunctions,
  21. to determine whether an enclosing type has a particular nested type or nested
  22. class template. An example with a library which was never submitted to Boost
  23. is the Concept Traits Library from which much of the functionality of this
  24. library, related to type traits, was taken and expanded.
  25. It may also be possible that some other Boost libraries, highly dependent
  26. on advanced template metaprogramming techniques, also have internal
  27. functionality to introspect a type's elements at compile time. But to the best
  28. of my knowledge this sort of functionality has never been incorporated in
  29. a single Boost library. This library is an attempt to do so, and to bring
  30. a recognizable set of interfaces to compile-time type introspection to Boost
  31. so that other metaprogramming libraries can use them for their own needs.
  32. [endsect]