]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/convert/doc/introduction.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / convert / doc / introduction.qbk
1 [/
2 Copyright (c) Vladimir Batov 2009-2016
3 Distributed under the Boost Software License, Version 1.0.
4 See copy at http://www.boost.org/LICENSE_1_0.txt.
5 ]
6
7 [section Introduction]
8
9 ['Boost.Convert] builds on the `boost::lexical_cast` experience and takes those type conversion\/transformation-related ideas further
10
11 * to be applicable to a wider range of conversion-related deployment scenarios,
12 * to provide a more flexible, configurable and extendible type-conversion framework,
13 * to provide generic consistent behavior,
14 * to ['unify and to uniformly deploy] various conversion facilities ['through one consistent interface].
15
16 ['Boost.Convert] provides new and familiar conversion\/transformation-related functionality such as:
17
18 * means to deploy types that do not meet the [@http://en.cppreference.com/w/cpp/concept/DefaultConstructible ['Default Constructibility]] requirement;
19 * four types of the conversion-failure ['detection]:
20 * as part of the same process flow -- basic and generic;
21 * as a branched process flow -- exception-based and function-based;
22 * the choice of immediate or delayed exception-throwing and non-throwing conversion-failure ['processing];
23 * flexibility of conversion-failure ['processing] via:
24 * an exception thrown;
25 * the fallback value returned;
26 * the fallback function called;
27 * support for standard algorithms.
28
29 ['Boost.Convert] consists of two components:
30
31 * the `boost::convert()` interface;
32 * an extendible collection of pluggable converters.
33
34 The `boost::convert()` interface
35
36 * advertises, provides and ensures certain ['consistent behavior];
37 * unifies and provides ['one consistent interface] to various conversion facilities.
38
39 The collection of pluggable converters is independent of the `boost::convert()` API facade and is designed to be ['extendible] and extended over time. Currently the following converters are provided:
40
41 * `boost::lexical_cast`-based,
42 * `printf/scanf`-based,
43 * `strtol`-inspired,
44 * `std::stringstream`-based,
45 * `boost::spirit`-based.
46
47 The converters provide new and familiar functionality and demonstrate how existing and independent conversion facilities might be incorporated in to the ['Boost.Convert] framework. For example, the `std::stream`-based converter draws on the standard `std::streams` functionality and provides:
48
49 * string-to-type and type-to-string conversions;
50 * formatting support (`std::ios`-based precision, base, upper/lower-case, scientific, etc.);
51 * support for different `locale`s;
52 * `char` and `wchar_t` support.
53
54 [import ../example/algorithms.cpp]
55
56 [algorithm_introduction]
57
58 [endsect] [/section Introduction]
59