• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8[section:tti_reason Why the TTI Library ?]
9
10In the Boost Type Traits library there is compile time functionality for
11querying information about a C++ type. This information is very useful
12during template metaprogramming and forms the basis, along with the
13constructs of the Boost MPL library, and some other compile time
14libraries, for much of the template metaprogramming in Boost.
15
16One area which is mostly missing in the Type Traits library is the ability
17to determine what C++ inner elements are part of a user-defined type, where
18the inner element may be a general nested type, a specific nested type such as a
19class/struct, enumeration, or a union, a function or data member, static function or
20static data member, or class template.
21
22There has been some of this functionality in Boost, both in already existing
23libraries and in libraries on which others have worked but which were
24never submitted for acceptance into Boost. An example with an existing Boost
25library is Boost MPL, where there is functionality, in the form of macros and
26metafunctions, to determine whether an enclosing type has a particular nested
27type or nested class template. An example with a library which was never
28submitted to Boost is the Concept Traits Library from which much of the
29functionality of this library, related to type traits, was taken and expanded.
30
31It may also be possible that some other Boost libraries, highly dependent
32on advanced template metaprogramming techniques, also have internal
33functionality to introspect a type's elements at compile time. But to the best
34of my knowledge this sort of functionality has never been incorporated in
35a single Boost library. This library is an attempt to do so, and to bring
36a recognizable set of interfaces to compile-time type introspection to Boost
37so that other metaprogramming libraries can use them for their own needs.
38
39[endsect]
40