    The standard bf(C) library offers conversion functions like ti(atoi),
ti(atol), and other functions that can be used to convert NTB strings
to numeric values. In bf(C++), these functions are still available, but a more
em(type safe) way to convert text to other types uses objects of the class
 hi(istringstream)tt(std::istringsteam).

Using the class tt(istringstream) instead of the bf(C) standard conversion
functions may have the advantage of type-safety, but it also appears to be a
rather cumbersome alternative. After all, we first have to construct and
initialize a tt(std::istringstream) object before we're able to extract a
value of some type from it. This requires us to use a variable. Then, in cases
where the extracted value is only needed to initialize some
function-parameter, one might wonder whether the added variable and the
tt(istringstream) construction can somehow be avoided.

In this section we'll develop a class hi(A2x)(tt(A2x)) preventing all the
disadvantages of the standard bf(C) library functions, without requiring the
cumbersome definitions of tt(istringstream) objects over and over
again. The class is called tt(A2x), meaning
        hi(ascii to anything)
    `i(ascii to anything)'.

    tt(A2x) objects can be used to extract values of any type extractable from
tt(std::istream) objects. Since tt(A2x) represents the object-variant of the
bf(C) functions, it is not only type-safe but em(also) extensible. So its use
is greatly preferred over using the standard bf(C) functions. Here are its
characteristics:
    itemization(
    it() tt(A2x) is derived from tt(std::istringstream), and so all members of
the class tt(istringstream) are available for tt(A2x) objects.
Extractions of values of variables can always
effortlessly be performed. Here's the class's interface:
        verbinclude(//CLASS examples/a2x.h)
    it() tt(A2x) has a default constructor and a constructor expecting a
tt(std::string) argument. The latter constructor may be used to initialize
tt(A2x) objects with text to be converted (e.g., a line of text obtained from
reading a configuration file):
        verbinclude(//CONS examples/a2x.h)
    it() tt(A2x)'s real strength comes from its tt(operator Type()) conversion
member template. As it is a member template, it automatically adapts
itself to the type of the variable that should be given a value, obtained by
converting the text stored inside the tt(A2x) object to the variable's
type. When the extraction fails, tt(A2x)'s inherited tt(good) member returns
tt(false).
    it() Occasionally the compiler may not be able to determine
which type to convert to. In that case, an em(explicit template type) could be
used:
        verb(
            A2x.operator int<int>();
            // or just:
            A2x.operator int();
        )
        As neither syntax looks attractive, the member template
tt(to) is provided too, allowing constructions like:
        verb(
    A2x.to<int>();
        )
        Here is its implementation:
            verbinclude(//TO examples/a2x.h)
    it() The tt(to) member makes it easy to  implement tt(operator Type()):
            verbinclude(//TYPE examples/a2x.h)
    it() Once an tt(A2x) object is available, it may be reinitialized using
tt(operator=):
            verbinclude(-a examples/a2xis.cc)
    )
    Here are some examples showing tt(A2x) being used:
        verbinclude(//MAIN examples/a2x.cc)

    A complementary class
        hi(X2a)
    (tt(X2a)), converting values to text, can be constructed as well. Its
construction is left as an exercise to the reader.
