[boost-doc-zh] r390 committed - 翻译 numeric/conversion 库的 qbk 文件并生成 html 目录

  • From: boost-doc-zh@xxxxxxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Tue, 23 Mar 2010 03:46:26 +0000

Revision: 390
Author: alai04
Date: Mon Mar 22 20:44:11 2010
Log: 翻译 numeric/conversion 库的 qbk 文件并生成 html 目录
http://code.google.com/p/boost-doc-zh/source/detail?r=390

Modified:
 /trunk/libs/numeric/conversion/doc/bounds.qbk
 /trunk/libs/numeric/conversion/doc/conversion.qbk
 /trunk/libs/numeric/conversion/doc/conversion_traits.qbk
 /trunk/libs/numeric/conversion/doc/converter.qbk
 /trunk/libs/numeric/conversion/doc/converter_policies.qbk
 /trunk/libs/numeric/conversion/doc/definitions.qbk
/trunk/libs/numeric/conversion/doc/html/boost_numericconversion/bounds___traits_class.html /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/conversion_traits___traits_class.html /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/converter___function_object.html /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/numeric_converter_policy_classes.html /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/type_requirements_and_user_defined_types_support.html
 /trunk/libs/numeric/conversion/doc/html/index.html
/trunk/libs/numeric/conversion/doc/html/numeric_conversion/bibliography.html /trunk/libs/numeric/conversion/doc/html/numeric_conversion/history_and_acknowledgments.html
 /trunk/libs/numeric/conversion/doc/numeric_cast.qbk
 /trunk/libs/numeric/conversion/doc/requirements.qbk

=======================================
--- /trunk/libs/numeric/conversion/doc/bounds.qbk       Mon Feb  8 07:24:10 2010
+++ /trunk/libs/numeric/conversion/doc/bounds.qbk       Mon Mar 22 20:44:11 2010
@@ -10,19 +10,24 @@

 [section bounds<> traits class]

-[section Introduction]
+[section:introduction Introduction 简介]

To determine the ranges of numeric types with `std::numeric_limits` \[18.2.1\],
 different syntax have to be used depending on numeric type. Specifically,
`numeric_limits<T>::min()` for integral types returns the minimum finite value,
 whereas for floating point types it returns the minimum positive normalized
 value. The difference in semantics makes client code unnecessarily complex
-and error prone.
+and error prone.\n
+用 `std::numeric_limits` \[18.2.1\] 来判断数字类型的范围时,必须根据数字类 型使用不同的语法。 +特别地,对于整型类型,`numeric_limits<T>::min()` 返回最小限值,而对于浮点类 型则返回正的最小正规值。
+这种语义上的差异使得用户代码变得复杂和易错。

`boost::numeric::bounds<>` provides a consistent interface for retrieving the maximum finite value, the minimum finite value and the minimum positive normalized value (0 for integral types) for numeric types. The selection of implementation
-is performed at compile time, so there is no runtime overhead.
+is performed at compile time, so there is no runtime overhead.\n
+`boost::numeric::bounds<>` 提供了一致的接口来获得数字类型的最大限值、最小限 值和正的最小正规值(对于整型类型为0)。
+具体实现的选择是在编译期执行,所以没有运行期的开销。

 [endsect]

@@ -36,29 +41,33 @@
         static N smallest() { return implementation_defined; }
     };

-[heading Members]
+[heading Members 成员]


 [: `lowest()` ]

Returns the minimum finite value, equivalent to `numeric_limits<T>::min()` when `T` -is an integral type, and to `-numeric_limits<T>::max()` when `T` is a floating point type. +is an integral type, and to `-numeric_limits<T>::max()` when `T` is a floating point type.\n +返回最小限值,如果 `T` 是一个整型类型则等同于 `numeric_limits<T>::min()`,如果 `T` 是一个浮点类型则等同于 `-numeric_limits<T>::max()`。

 [: `highest()` ]

-Returns the maximum finite value, equivalent to `numeric_limits<T>::max()`.
+Returns the maximum finite value, equivalent to `numeric_limits<T>::max()`.\n
+返回最大限值,等同于 `numeric_limits<T>::max()`.

 [: `smallest()` ]

Returns the smallest positive normalized value for floating point types with
-denormalization, or returns 0 for integral types.
+denormalization, or returns 0 for integral types.\n
+对于反规格化的浮点类型,返回正的最小正规值,对于整型类型返回0。

 [endsect]

-[section Examples]
+[section:examples Examples 例子]

 The following example demonstrates the use of `numeric::bounds<>` and the
-equivalent code using `numeric_limits`:
+equivalent code using `numeric_limits`:\n
+以下例子示范了 `numeric::bounds<>` 的使用,以及使用 `numeric_limits` 的等效 代码:

     #include <iostream>

=======================================
--- /trunk/libs/numeric/conversion/doc/conversion.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/conversion.qbk Mon Mar 22 20:44:11 2010
@@ -42,36 +42,53 @@



-[section Overview]
+[section:overview Overview 概览]

The Boost Numeric Conversion library is a collection of tools to describe and
 perform conversions between values of different
-[link boost_numericconversion.definitions.numeric_types numeric types].
+[link boost_numericconversion.definitions.numeric_types numeric types].\n
+Boost Numeric Conversion 库是一组用于描述和执行不同 [link boost_numericconversion.definitions.numeric_types 数字类型] 间的转换的工具。

The library includes a special alternative for a subset of `std::numeric_limits<>`, the [link boost_numericconversion.bounds___traits_class bounds<>] traits class, which provides a consistent way to obtain the [link boost_numericconversion.definitions.range_and_precision boundary] -values for the [link boost_numericconversion.definitions.range_and_precision range] of a numeric type. +values for the [link boost_numericconversion.definitions.range_and_precision range] of a numeric type.\n +本库包含了 `std::numeric_limits<>` 的一个子集的特殊替代物,[link boost_numericconversion.bounds___traits_class bounds<>] traits 类, +它提供了一致的方式来获得一个数字类型的 [link boost_numericconversion.definitions.range_and_precision 范围] 的
+[link boost_numericconversion.definitions.range_and_precision 边界] 值。

It also includes a set of [link boost_numericconversion.conversion_traits___traits_class trait classes]
 which describes the compile-time
 properties of a conversion from a source to a target numeric type.
Both [link boost_numericconversion.definitions.c___arithmetic_types arithmetic] and -[link boost_numericconversion.definitions.numeric_types user-defined numeric types] can be used. +[link boost_numericconversion.definitions.numeric_types user-defined numeric types] can be used.\n +它还包括了一组 [link boost_numericconversion.conversion_traits___traits_class trait 类], +用于描述一个从源数字类型到目标数字类型的转换的一些编译期属性。[link boost_numericconversion.definitions.c___arithmetic_types 算术类型] +和 [link boost_numericconversion.definitions.numeric_types 用户自定义的数字 类型] 均可使用。

A policy-based [link boost_numericconversion.converter___function_object converter] object which
 uses `conversion_traits` to select
an optimized implementation is supplied. Such implementation uses an optimal
-range checking code suitable for the source/target combination.
+range checking code suitable for the source/target combination.\n
+一个基于策略的 [link boost_numericconversion.converter___function_object 转 换器] 对象,提供了使用 `conversion_traits` 来选择优化的实现。
+该实现使用一个优化的适用于源/目标组合的范围检查代码。

 * The converter's out-of-range behavior can be customized via an
-[link boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler OverflowHandler] policy. +[link boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler OverflowHandler] policy.\n +转换器的溢出行为可以通过 [link boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler OverflowHandler]
+策略来定制。
* For floating-point to integral conversions, the rounding mode can be selected via the -[link boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder Float2IntRounder] policy. +[link boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder Float2IntRounder] policy.\n +对于浮点数到整数的转换,舍入的模式可以通过 [link boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder
+Float2IntRounder] 策略来选择。
* A custom low-level conversion routine (for UDTs for instance) can be passed via a -[link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] policy. +[link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] policy.\n +定制的低级转换程序(如用于UDT)可通过 [link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter]
+策略传入。
 * The optimized automatic range-checking logic can be overridden via a
-[link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] policy. +[link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] policy.\n +优化的自动范围检查逻辑可通过 [link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker]
+策略进行重载。

 [endsect]

@@ -87,48 +104,59 @@



-[section History and Acknowledgments]
+[section:history_and_acknowledgments History and Acknowledgments 历史和鸣谢 ]


-[heading Pre-formal review]
+[heading Pre-formal review 正式审查之前]

* Kevlin Henney, with help from David Abrahams and Beman Dawes, originally contributed the previous version of `numeric_cast<>` which already presented the idea of a runtime
-range check.
+range check.\n
+Kevlin Henney,在 David Abrahams 和 Beman Dawes 的帮助下,贡献了 `numeric_cast<>` 的早期版本,其中已经出现了运行期范围检查的想法。

* Later, Eric Ford, Kevin Lynch and the author spotted some genericity problems with that `numeric_cast<>` which prevented it from being used in a generic layer of math
-functions.
+functions.\n
+后来,Eric Ford, Kevin Lynch 和作者发现了 `numeric_cast<>` 的一些泛型的问 题,这妨碍了它被用于数学函数的泛化层。

* An improved `numeric_cast<>` which properly handled all combinations of arithmetic
-types was presented.
+types was presented.\n
+一个改进后的 `numeric_cast<>`,可以正确处理算术类型的所有组合。

* David Abrahams and Beman Dawes acknowledged the need of an improved version of `numeric_cast<>` and supported the submission as originally laid out. Daryl Walker and -Darin Adler made some important comments and proposed fixes to the original submission. +Darin Adler made some important comments and proposed fixes to the original submission.\n +David Abrahams 和 Beman Dawes 认识到需要一个改进版本的 `numeric_cast<>` 并 支持原先提交的规定。 +Daryl Walker 和 Darin Adler 作了一些重要的说明并对原先的规定建议了一些修 正。

* Special thanks go to Björn Karlsoon who helped the author considerably. Having found the problems with `numeric_cast<>` himself, he revised very carefully the original submission and spot a subtle bug in the range checking implementation. He also wrote part of this documentation and proof-read and corrected other parts. And most importantly: the features now presented here in this library evolved from the original submission as
-a result of the useful private communications between Björn and the author.
-
-[heading Post-formal review]
+a result of the useful private communications between Björn and the author.\n +特别感谢给予了作者相当多帮助的 Björn Karlsoon。他发出了 `numeric_cast<>` 的 一些问题, +非常仔细地修正了原先的规定并在范围检查实现中发现了一个微妙的缺陷。他还编写 了部分文档和校对并修正了其它部分。 +最重要的是:本库中目前的特性是由原先的规定经由 Björn 和作者的私下沟通而进化 而来的。
+
+[heading Post-formal review 正式审查之后]

* Guillaume Melquiond spoted some documentation and code issues, particularly about
-rounding conversions.
+rounding conversions.\n
+Guillaume Melquiond 指出一些文档和代码的问题,特别是与舍入转换有关的。

* The following people contributed an important review of the design, documentation and c ode: Kevin Lynch, Thorsten Ottosen, Paul Bristow, Daryle Walker, Jhon Torjo, Eric Ford,
-Gennadiy Rozental.
+Gennadiy Rozental.\n
+以下人员对于设计、文档和代码的审查作出重要贡献:Kevin Lynch, Thorsten Ottosen, Paul Bristow,
+Daryle Walker, Jhon Torjo, Eric Ford, Gennadiy Rozental.


 [endsect]

-[section Bibliography]
-
-* Standard Documents:
+[section:bibliography Bibliography 参考书目]
+
+* Standard Documents:  标准文档:
     # ISO/IEC 14882:98 (C++98 Standard)
     # ISO/IEC 9899:1999 (C99 Standard)
     # ISO/IEC 10967-1 (Language Independent Arithmetic (LIA), Part I, 1994)
@@ -137,7 +165,7 @@
     # ANSI/IEEE 854-1988 (Radix Independent floating-point)
     # ANSI X3/TR-1-82 (Dictionary for Information Processing Systems)
# ISO/IEC JTC1/SC22/WG14/N753 C9X Revision Proposal: LIA-1 Binding: Rationale
-* Papers:
+* Papers: 论文:
# David Goldberg What Every Computer Scientist Should Know About Floating-Point Arithmetic
     # Prof. William Kahan papers on floating-point.

=======================================
--- /trunk/libs/numeric/conversion/doc/conversion_traits.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/conversion_traits.qbk Mon Mar 22 20:44:11 2010
@@ -10,7 +10,7 @@

 [section conversion_traits<> traits class]

-[section Types]
+[section:types Types 类型]

 [section enumeration int_float_mixture_enum]

@@ -70,10 +70,13 @@
     } } // namespace boost::numeric

Classifying `S` and `T` as either integral or float, this __MPL_INTEGRAL_CONSTANT__
-indicates the combination of these attributes.
+indicates the combination of these attributes.\n
+将 `S` 和 `T` 分类为整型的或浮点的,这个 __MPL_INTEGRAL_CONSTANT__ 表示了这 些属性的组合。

 Its `::value` is of enumeration type
-[link boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum `boost::numeric::int_float_mixture_enum`] +[link boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum `boost::numeric::int_float_mixture_enum`]\n +其 `::value` 为枚举类型 [link boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum
+`boost::numeric::int_float_mixture_enum`]

 [endsect]

@@ -87,9 +90,12 @@
     } } // namespace boost::numeric

Classifying `S` and `T` as either signed or unsigned, this __MPL_INTEGRAL_CONSTANT__
-indicates the combination of these attributes.
+indicates the combination of these attributes.\n
+将 `S` 和 `T` 分类为有符号的或无符号的,这个 __MPL_INTEGRAL_CONSTANT__ 表示 了这些属性的组合。

 Its `::value` is of enumeration type
+[link boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum `boost::numeric::sign_mixture_enum`]\n
+其 `::value` 为枚举类型
[link boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum `boost::numeric::sign_mixture_enum`]

 [endsect]
@@ -104,10 +110,13 @@
     } } // namespace boost::numeric

Classifying `S` and `T` as either user-defined or builtin, this __MPL_INTEGRAL_CONSTANT__
-indicates the combination of these attributes.
+indicates the combination of these attributes.\n
+将 `S` 和 `T` 分类为用户自定义的或内建的,这个 __MPL_INTEGRAL_CONSTANT__ 表 示了这些属性的组合。

 Its `::value` is of enumeration type
-[link boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum `boost::numeric::udt_builtin_mixture_enum`] +[link boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum `boost::numeric::udt_builtin_mixture_enum`]\n +其 `::value` 为枚举类型 [link boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum
+`boost::numeric::udt_builtin_mixture_enum`]

 [endsect]

@@ -122,13 +131,16 @@

Indicates if the range of the target type `T` is a subset of the range of the source
 type `S`. That is: if there are some source values which fall out of the
-Target type's range.
-
-It is a boolean __MPL_INTEGRAL_CONSTANT__.
+Target type's range.\n
+指明目标类型 `T` 的范围是否为源类型 `S` 的范围的子集。即:是否有一些源类型 的值在目标类型范围以外。
+
+It is a boolean __MPL_INTEGRAL_CONSTANT__.\n
+它是一个布尔 __MPL_INTEGRAL_CONSTANT__。

It does not indicate if a particular conversion is effectively out of range;
 it indicates that some conversion might be out of range because not all the
-source values are representable as Target type.
+source values are representable as Target type.\n
+它并不能指明某个特定的转换是否超出范围;它只是指明有些转换可能会超出范 围,因为不是所有源类型的值都可以表示为目标类型。

 [endsect]

@@ -160,77 +172,102 @@
This traits class indicates some properties of a ['numeric conversion] direction: from a source type `S` to a target type `T`. It does not indicate the properties
 of a ['specific] conversion, but of the conversion direction. See
-[link boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype Definitions] for details. +[link boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype Definitions] for details.\n +这个 traits 类表示一个 ['数字转换] 方向:从源类型 `S` 到目标类型 `T` 的一些 属性。
+它不表示某个['特定]转换的属性,而是表示转换方向的属性。详情请见
+[link boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype 定义]。

The traits class provides the following __MPL_INTEGRAL_CONSTANT__\s of enumeration
 type. They express the combination of certain attributes of the Source and
-Target types (thus they are call mixture):
+Target types (thus they are call mixture):\n
+这个 traits 类提供以下枚举类型的 __MPL_INTEGRAL_CONSTANT__。它们表示了源类 型和目标类型的特定属性的组合(因此称为混合的):

 [table
 [[       ][        ]]
 [[[*int_float_mixture   ]][
 Same as given by the traits class
-[link boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__ int_float_mixture] +[link boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__ int_float_mixture]\n +与 traits 类 [link boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__ int_float_mixture]
+所给出的相同
 ]]
 [[[*sign_mixture        ]][
 Same as given by the traits class
-[link boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__ sign_mixture] +[link boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__ sign_mixture]\n +与 traits 类 [link boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__ sign_mixture] 所给出的相同
 ]]
 [[[*udt_builtin_mixture ]]
 [Same as given by the traits class
-[link boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__ udt_builtin_mixture] +[link boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__ udt_builtin_mixture]\n +与 traits 类 [link boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__
+udt_builtin_mixture] 所给出的相同
 ]]
 ]

The traits class provides the following __MPL_INTEGRAL_CONSTANT__\s of boolean type which indicates indirectly the relation between the Source and Target ranges -(see [link boost_numericconversion.definitions.range_and_precision Definitions] for details). +(see [link boost_numericconversion.definitions.range_and_precision Definitions] for details).\n +这个 traits 类提供以下布尔类型的 __MPL_INTEGRAL_CONSTANT__,间接地表示源类 型范围和目标类型范围间的关系(详见
+[link boost_numericconversion.definitions.range_and_precision 定义])。

 [table
 [[       ][        ]]
 [[subranged ][
-Same as given by [link boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__ is_subranged] +Same as given by [link boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__ is_subranged]\n +与 [link boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__ is_subranged] 所给出的相同
 ]]
 [[trivial][
-Indicates if both Source and Target, [_without cv-qualifications], are the same type.
-
-Its `::value` is of boolean type.
+Indicates if both Source and Target, [_without cv-qualifications], are the same type.\n
+表明源类型和目标类型 [_在不考虑cv-限定符下] 是否为相同类型。
+
+Its `::value` is of boolean type.\n
+其 ::value 为布尔类型。
 ]]
 ]

The traits class provides the following types. They are the Source and Target types classified
-and qualified for different purposes.
+and qualified for different purposes.\n
+这个 traits 类提供以下类型。它们根据不同目的对源类型和目标类型进行分类和限 定。


 [table
 [[            ][         ]]
 [[[*target_type]][
-The template parameter `T` without cv-qualifications
+The template parameter `T` without cv-qualifications\n
+不带cv-限定符的模板参数 `T`
 ]]
 [[[*source_type]][
-The template parameter `S` without cv-qualifications
+The template parameter `S` without cv-qualifications\n
+不带cv-限定符的模板参数 `S`
 ]]
 [[[*argument_type]][
-This type is either source_type or `source_type const&`.
+This type is either source_type or `source_type const&`.\n
+该类型为 `source_type` 或 `source_type const&`。

 It represents the optimal argument type for the
-[link boost_numericconversion.converter___function_object converter] member functions.
-
-If S is a built-in type, this is `source_type`, otherwise, this is `source_type const&`. +[link boost_numericconversion.converter___function_object converter] member functions.\n +它表示了用于 [link boost_numericconversion.converter___function_object converter] 成员函数的优化参数类型。
+
+If S is a built-in type, this is `source_type`, otherwise, this is `source_type const&`.\n
+如果 `S` 是内建类型,则它为 `source_type`,否则为 `source_type const&`。
 ]]
 [[[*result_type]][
-This type is either target_type or target_type const&
+This type is either target_type or target_type const&\n
+该类型为 `target_type` 或 `target_type const&`。

 It represents the return type of the
-[link boost_numericconversion.converter___function_object converter] member functions.
-
-If `T==S`, it is `target_type const&`, otherwise, it is `target_type`.
+[link boost_numericconversion.converter___function_object converter] member functions.\n +它表示了用于 [link boost_numericconversion.converter___function_object converter] 成员函数的返回类型。
+
+If `T==S`, it is `target_type const&`, otherwise, it is `target_type`.\n
+如果 `T==S`,则它为 `target_type const&`,否则为 `target_type`。
 ]]
 [[[*supertype]][
-If the conversion is subranged, it is `source_type`, otherwise, it is `target_type` +If the conversion is subranged, it is `source_type`, otherwise, it is `target_type`\n
+如果转换是子范围的,它为 `source_type`,否则为 `target_type`。
 ]]
 [[[*subtype]][
-If the conversion is subranged, it is `target_type`, otherwise, it is `source_type` +If the conversion is subranged, it is `target_type`, otherwise, it is `source_type`\n
+如果转换是子范围的,它为 `target_type`,否则为 `source_type`。
 ]]
 ]

@@ -238,7 +275,7 @@

 [endsect]

-[section Examples]
+[section:examples Examples 例子]

     #include <cassert>
     #include <typeinfo>
@@ -247,11 +284,11 @@
     int main()
     {

-        // A trivial conversion.
+        // A trivial conversion. 简单转换
typedef boost::numeric::conversion_traits<short,short> Short2Short_Traits ;
         assert ( Short2Short_Traits::trivial::value ) ;

-        // A subranged conversion.
+        // A subranged conversion. 子范围转换
typedef boost::numeric::conversion_traits<double,unsigned int> UInt2Double_Traits ; assert ( UInt2Double_Traits::int_float_mixture::value == boost::numeric::integral_to_float ) ; assert ( UInt2Double_Traits::sign_mixture::value == boost::numeric::unsigned_to_signed ) ;
@@ -259,7 +296,7 @@
assert ( typeid(UInt2Double_Traits::supertype) == typeid(double) ) ; assert ( typeid(UInt2Double_Traits::subtype) == typeid(unsigned int) ) ;

-        // A doubly subranged conversion.
+        // A doubly subranged conversion. 双子范围转换
assert ( (boost::numeric::conversion_traits<short, unsigned short>::subranged::value) ); assert ( (boost::numeric::conversion_traits<unsigned short, short>::subranged::value) );

=======================================
--- /trunk/libs/numeric/conversion/doc/converter.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/converter.qbk Mon Mar 22 20:44:11 2010
@@ -8,9 +8,9 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ]

-[section converter<> function object]
-
-[section Synopsis]
+[section:converter___function_object converter<> function object converter<>函数对象]
+
+[section:synopsis Synopsis 摘要]

     namespace boost { namespace numeric {

@@ -35,7 +35,7 @@

             result_type operator() ( argument_type s ) const ;

-            // Internal member functions:
+            // Internal member functions: 内部成员函数:

static range_check_result out_of_range ( argument_type s ) ; static void validate_range ( argument_type s ) ;
@@ -52,84 +52,107 @@
 properties specified by the Traits template parameter. It can optionally
take some [link boost_numericconversion.numeric_converter_policy_classes policies] which can be used to customize its behavior. The
 `Traits` parameter is not a policy but the parameter that defines
-the conversion.
+the conversion.\n
+`boost::numeric::converter<>` 是一个 __SGI_UNARY_FUNCTION__,它封装了执行数 字转换的代码,转换的方向和各种属性由 Traits 模板参数指定。 +它可选地接受一些 [link boost_numericconversion.numeric_converter_policy_classes 策略] 以定制其行 为。
+`Traits` 参数并非策略,但该参数定义了该转换。

 [endsect]

-[section Template parameters]
+[section:template_parameters Template parameters 模板参数]

 [table
 [[            ][           ]]
 [[`T`][
 The [link boost_numericconversion.definitions.numeric_types Numeric Type]
-which is the ['Target] of the conversion.
+which is the ['Target] of the conversion.\n
+作为转换 ['目标] 的 [link boost_numericconversion.definitions.numeric_types 数字类型]。
 ]]
 [[`S`][
 The [link boost_numericconversion.definitions.numeric_types Numeric Type]
-which is the ['Source] of the conversion.
+which is the ['Source] of the conversion.\n
+作为转换 ['源] 的 [link boost_numericconversion.definitions.numeric_types 数字类型]。
 ]]
 [[`Traits`][
 This must be a conversion traits class with the interface of
-[link boost_numericconversion.conversion_traits___traits_class `boost::numeric::conversion_traits`] +[link boost_numericconversion.conversion_traits___traits_class `boost::numeric::conversion_traits`]\n +必须是一个转换 traits 类,具有 [link boost_numericconversion.conversion_traits___traits_class `boost::numeric::conversion_traits`] 的接口
 ]]
 [[`OverflowHandler`][
-[*Stateless Policy] called to administrate the result of the range checking. +[*Stateless Policy] called to administrate the result of the range checking.\n
+[*无状态策略],被调用以处理范围检查的结果。

 It is a [*Function Object] which receives the result of `out_of_range()`
 and is called inside the `validate_range()` static member function exposed
-by the converter.
+by the converter.\n
+它是一个 [*函数对象],接受 `out_of_range()` 的结果,在由转换器所开放的 `validate_range()` 静态成员函数中被调用。
 ]]
 [[`Float2IntRounder`][
 [*Stateless Policy] which specifies the rounding mode used for float to
-integral conversions.
-
-It supplies the `nearbyint()` static member function exposed by the converter.
+integral conversions.\n
+[*无状态策略],指定用于浮点数到整数转换的舍入方式。
+
+It supplies the `nearbyint()` static member function exposed by the converter.\n
+它提供由转换器开放的 `nearbyint()` 静态成员函数。
 ]]
 [[`RawConverter`][
-[*Stateless Policy] which is used to perform the actual conversion.
+[*Stateless Policy] which is used to perform the actual conversion.\n
+[*无状态策略],用于执行实际的转换。

 It supplies the `low_level_convert()` static member function exposed
-by the converter.
+by the converter.\n
+它提供由转换器开放的 `low_level_convert()` 过静态成员函数。
 ]]
 [[`UserRangeChecker`][
 ['Special and Optional] [*Stateless Policy] which can be used to override
-the internal range checking logic.
+the internal range checking logic.\n
+['特定且可选的] [*无状态策略],可用于覆盖内部的范围检查逻辑。

 If given, supplies alternative code for the `out_of_range()` and
-`validate_range()` static member functions exposed by the converter.
+`validate_range()` static member functions exposed by the converter.\n
+如果给出,则提供由转换器开放的 `out_of_range()` 和 `validate_range()` 静态 成员函数的替换代码。
 ]]
 ]

 [endsect]

-[section Member functions]
-
-[: `static result_type converter<>::convert ( argument_type s ) ; // throw
+[section:member_functions Member functions 成员函数]
+
+[: `static result_type converter<>::convert ( argument_type s ) ; // throw 有抛出
 `]

 This static member function converts an rvalue of type `source_type` to
-an rvalue of type `target_type`.
+an rvalue of type `target_type`.\n
+该静态成员函数将一个类型为 `source_type` 的右值转换为一个类型为 `target_type` 的右值。

If the conversion requires it, it performs a range checking before the conversion and passes the result of the check to the overflow handler policy (the default
-policy throws an exception if out-of-range is detected)
+policy throws an exception if out-of-range is detected)\n
+如果转换需要,则在转换前执行一个范围检查,并将检查结果传递给溢出处理器策略 (缺省的策略是在检测到溢出时抛出一个异常)。

The implementation of this function is actually built from the policies and is
-basically as follows:
+basically as follows:\n
+该函数的实现实际上是依据策略来建造,基本如下:

     result_type converter<>::convert ( argument_type s )
     {
validate_range(s); // Implemented by the internal range checking logic
                            // (which also calls the OverflowHandler policy)
// or externally supplied by the UserRangeChecker policy. + // 由内部的范围检查逻辑来实现(它也调用 OverflowHandler 策略) + // 或者由 UserRangeChecker 策略所提供的外部逻辑 来实现

s = nearbyint(s); // Externally supplied by the Float2IntRounder policy. // NOTE: This is actually called only for float to int conversions.
+                          // 由 Float2IntRounder 策略提供的外部逻辑
+                          // 注:仅在浮点数至整数转换时实际调用

return low_level_convert(s); // Externally supplied by the RawConverter policy.
+                                     // 由 RawConverter 策略提供的外部逻辑
     }

-`converter<>::operator() const` just calls `convert()`
+`converter<>::operator() const` just calls `convert()`\n
+`converter<>::operator() const` 只是调用 `convert()`

 __SPACE__

@@ -137,55 +160,72 @@

This [link numeric_conversion_converter_internal internal] static member function
 determines if the value `s` can be
-represented by the target type without overflow.
+represented by the target type without overflow.\n
+该 [link numeric_conversion_converter_internal 内部] 静态成员函数判断值 `s` 是否可以被目标类型表示而没有溢出。

It does not determine if the conversion is ['exact]; that is, it does not detect
 ['inexact] conversions, only ['out-of-range] conversions (see the
-[link boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations Definitions] for further details). +[link boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations Definitions] for further details).\n +它不判断转换是否 ['精确];即它不检查 ['非精确的] 转换,只检查 ['超出范围的 ] 转换(进一步的细节请见 +[link boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations 定义])。

 The return value is of enum type
-[link boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result `boost::numeric::range_check_result`] +[link boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result `boost::numeric::range_check_result`]\n
+返回值为枚举类型
+[link boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result `boost::numeric::range_check_result`]

 The actual code for the range checking logic is optimized for the combined
 properties of the source and target types. For example, a non-subranged
conversion (i.e: `int`->`float`), requires no range checking, so `out_of_range()`
 returns `cInRange` directly. See the following
-[link boost_numericconversion.converter___function_object.range_checking_logic table] for more details. +[link boost_numericconversion.converter___function_object.range_checking_logic table] for more details.\n +范围检查逻辑的实际代码是根据源类型和目标类型的组合特性进行优化的。例如,一 个非子范围的转换(如:`int`->`float`), +就不需要范围检查,所以 `out_of_range()` 直接返回 `cInRange`。更多细节请见后 文中的 +[link boost_numericconversion.converter___function_object.range_checking_logic 表 格]。

 If the user supplied a
[link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] policy, is this policy which implements this function, so the implementation is user
 defined, although it is expected to perform the same conceptual check and
-return the appropriate result.
+return the appropriate result.\n
+如果用户提供了一个 [link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] 策略, +该策略要实现这个函数,则该实现就是用户自定义的,当然所期望的是要执行相同概 念上的检查并返回适当的结果。

 __SPACE__

-[: `static void numeric_converter<>::validate_range ( argument_type s ) ; // no throw +[: `static void numeric_converter<>::validate_range ( argument_type s ) ; // no throw 无抛出
 `]

This [link numeric_conversion_converter_internal internal] static member function
 calls out_of_range(s), and passes the
result to the [link boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler OverflowHandler]
-policy class.
+policy class.\n
+该 [link numeric_conversion_converter_internal 内部] 静态成员函数调用 out_of_range(s),并将结果传给 +[link boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler OverflowHandler] 策略类。

For those Target/Source combinations which don't require range checking, this
-is an empty inline function.
+is an empty inline function.\n
+对于那些不需要范围检查的目标/源类型组合,它是一个空的内联函数。

 If the user supplied a
[link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] policy, is this policy which implements this function, so the implementation is user
 defined, although it is expected to perform the same action as the default.
-In particular, it is expected to pass the result of the check to the overflow handler. +In particular, it is expected to pass the result of the check to the overflow handler.\n +如果用户提供了一个 [link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] 策略, +该策略要实现这个函数,则该实现就是用户自定义的,当然所期望的是要执行与缺省 相同的动作。特别是,要将检查的结果传递给溢出处理器。

 __SPACE__

[: `static result_type numeric_converter<>::low_level_convert ( argument_type s ) ;` ]

This [link numeric_conversion_converter_internal internal] static member function
-performs the actual conversion.
+performs the actual conversion.\n
+该 [link numeric_conversion_converter_internal 内部] 静态成员函数执行实际的 转换。

 This function is externally supplied by the
-[link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] policy class. +[link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] policy class.\n +该函数在外部由 [link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] 策略类提供。

 __SPACE__

@@ -194,34 +234,44 @@
This [link numeric_conversion_converter_internal internal] static member function,
 which is [_only used] for
`float` to `int` conversions, returns an ['integer] value of ['[_floating-point
-type]] according to some rounding direction.
+type]] according to some rounding direction.\n
+该 [link numeric_conversion_converter_internal 内部] 静态成员函数,[_仅用于 ] `float` 至 `int` 的转换,
+根据某个舍入的方向返回 ['[_浮点数类型]] 的一个['整数]值。

 This function is externally supplied by the
[link boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder Float2IntRounder] policy class
-which encapsulates the specific rounding mode.
+which encapsulates the specific rounding mode.\n
+该函数在外部由封装了特定舍入方式的
+[link boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder Float2IntRounder] 策略类提供。

 __SPACE__

 [#numeric_conversion_converter_internal]

-[heading Internal Member Functions]
+[heading Internal Member Functions 内部成员函数]

These static member functions build the actual conversion code used by `convert()`. The user does not have to call these if calling `convert()`, since `convert()` calls
-them infernally, but they can be called separately for specific needs.
+them infernally, but they can be called separately for specific needs.\n
+这些静态成员函数构建了用于 `convert()` 的实际转换代码。用户代码如果调用了 `convert()` 就无需调用它们, +因为 `convert()` 已经在内部调用了它们,不过如果有特别需要,它们也可以被单独 调用。

 [endsect]

-[section Range Checking Logic]
+[section:range_checking_logic Range Checking Logic 范围检查逻辑]

The following table summarizes the internal range checking logic performed for
-each combination of the properties of Source and Target.
-
-LowestT/HighestT denotes the highest and lowest values of the Target type, respectively.
-
-`S(n)` is short for `static_cast<S>(n)` (`S` denotes the Source type).
-
-`NONE` indicates that for this case there is no range checking.
+each combination of the properties of Source and Target.\n
+下表总结了对各种源类型和目标类型组合所执行的内部范围检查逻辑。
+
+LowestT/HighestT denotes the highest and lowest values of the Target type, respectively.\n
+LowestT/HighestT 分别表示目标类型的最大值和最小值。
+
+`S(n)` is short for `static_cast<S>(n)` (`S` denotes the Source type).\n
+`S(n)` 是 `static_cast<S>(n)` 的缩写(`S` 表示源类型)。
+
+`NONE` indicates that for this case there is no range checking.\n
+`NONE` 表示此种情况无范围检查。

 [pre
 [^
@@ -256,7 +306,7 @@

 [endsect]

-[section Examples]
+[section:examples Examples 例子]

     #include <cassert>
     #include <boost/numeric/conversion/converter.hpp>
@@ -268,13 +318,14 @@
         int x = Double2Int::convert(2.0);
         assert ( x == 2 );

-        int y = Double2Int()(3.14); // As a function object.
-        assert ( y == 3 ) ; // The default rounding is trunc.
+ int y = Double2Int()(3.14); // As a function object. 作为一个函数对 象。 + assert ( y == 3 ) ; // The default rounding is trunc. 缺省的舍入方 式是截断。

         try
         {
             double m = boost::numeric::bounds<double>::highest();
int z = Double2Int::convert(m); // By default throws positive_overflow()
+                                            // 缺省抛出 positive_overflow()
         }
         catch ( boost::numeric::positive_overflow const& )
         {
=======================================
--- /trunk/libs/numeric/conversion/doc/converter_policies.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/converter_policies.qbk Mon Mar 22 20:44:11 2010
@@ -8,7 +8,7 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ]

-[section Numeric Converter Policy Classes]
+[section:numeric_converter_policy_classes Numeric Converter Policy Classes 数字转换器策略类]


 [section enum range_check_result]
@@ -24,33 +24,40 @@

     } }

-Defines the values returned by `boost::numeric::converter<>::out_of_range()` +Defines the values returned by `boost::numeric::converter<>::out_of_range()`\n
+定义由 `boost::numeric::converter<>::out_of_range()` 返回的值。

 [endsect]

-[section Policy OverflowHandler]
+[section:policy_overflowhandler Policy OverflowHandler 策略OverflowHandler]

This ['stateless] non-template policy class must be a ['function object] and is called to administrate the result of the range checking. It can throw an exception if overflow has been detected by the range checking as indicated by its argument.
-If it throws, is is recommended that it be `std::bad_cast` or derived.
-
-It must have the following interface (it does not has to be a template class):
+If it throws, is is recommended that it be `std::bad_cast` or derived.\n
+这个['无状态]非模板策略类必须是一个['函数对象],它被调用来对范围检查的结果 进行处理。 +如果范围检查已检测出溢出并通过调用实参来表示,则它可以抛出一个异常。如果要 抛出异常,建议使用 `std::bad_cast` 或其派生类。
+
+It must have the following interface (it does not has to be a template class):\n
+它必须具有以下接口(不必是模板类):

     struct YourOverflowHandlerPolicy
     {
void operator() ( boost::range_check_result ) ; // throw bad_cast or derived
     } ;

-It is called with the result of the converter's `out_of_range()` inside `validate_range()`.
-
-These are the two overflow handler classes provided by the library:
+It is called with the result of the converter's `out_of_range()` inside `validate_range()`.\n +该函数函数被以 `validate_range()` 内的转换器的 `out_of_range()` 为参数调 用。
+
+These are the two overflow handler classes provided by the library:\n
+本库提供了两个重载的处理类:

     namespace boost { namespace numeric {

         struct def_overflow_handler
         {
void operator() ( range_check_result r ) // throw bad_numeric_conversion derived + // 抛出 bad_numeric_conversion 的派生类
             {
                 if ( r == cNegOverflow )
                     throw negative_overflow() ;
@@ -61,14 +68,15 @@

         struct silent_overflow_handler
         {
-            void operator() ( range_check_result ) // no-throw
+            void operator() ( range_check_result ) // no-throw 无抛出
             {}
         } ;

     } }

 And these are the Exception Classes thrown by the default overflow handler
-[link numeric_conversion_policy_overflow_handler_important_note (see IMPORTANT note)] +[link numeric_conversion_policy_overflow_handler_important_note (see IMPORTANT note)]\n +以下是被缺省的溢出处理器所抛出的异常类[link numeric_conversion_policy_overflow_handler_important_note (请见重要说明)]

     namespace boost { namespace numeric {

@@ -117,19 +125,27 @@
 That old function which existed in boost for quite some time used the
 `bad_numeric_cast` as its exception type so I decided to avoid backward
 compatibility problems by adopting it (guessing that the user base for
-the old code is wider than for the new code).
+the old code is wider than for the new code).\n
+[*对1.33版本的说明] 在 boost 版本 1.33 之前,异常类 `bad_numeric_cast` 命名 为 `bad_numeric_conversion`。 +但是,在 1.33 中,来自 `boost/cast.hpp` 的旧函数 `numeric_cast<>` 已完全被 `boost/numeric/conversion/cast.hpp` +中的新 `numeric_cast<>` 所替代(而且现在 `boost/cast.hpp` 被包含在 `boost/numeric/conversion/cast.hpp` 中)。 +那些在 boost 中已经存在了一段时间的旧函数是把 `bad_numeric_cast` 用作其异常 类型的, +所以我决定通过采用这个异常类以避免后向兼容性的问题(我猜测基于旧代码的用户经 多于基于新代码的)。
 ]

 [endsect]

-[section Policy Float2IntRounder]
+[section:policy_float2introunder Policy Float2IntRounder 策略 Float2IntRounder ]

 This ['stateless] template policy class specifies the rounding mode used
 for [_float to integral] conversions. It supplies the `nearbyint()`
 static member function exposed by the converter, which means that it
-[_publicly inherits from this policy].
-
-The policy must have the following interface:
+[_publicly inherits from this policy].\n
+这个['无状态]模板策略类指定用于 [_浮点至整型] 转换的舍入方式。它提供了由转 换器暴露出来的 `nearbyint()` 静态成员函数,
+即转换器要 [_公有地继承自这个策略]。
+
+The policy must have the following interface:\n
+该策略必须具有以下接口:

     template<class S>
     struct YourFloat2IntRounderPolicy
@@ -144,11 +160,13 @@
     } ;

These are the rounder classes provided by the library (only the specific parts are shown,
-see the general policy form above)
+see the general policy form above)\n
+本库提供了几个舍入器类(以下仅展示规格部分,参见上面的通用策略形式)

 [note
 These classes are not intended to be general purpose rounding functions
-but specific policies for `converter<>`. This is why they are not function objects. +but specific policies for `converter<>`. This is why they are not function objects.\n +这些类并不是通用的舍入函数,而是专门用于 `converter<>` 的策略。这正是为什么 它们不是函数对象的原因。
 ]

     namespace boost { namespace numeric {
@@ -207,31 +225,39 @@

     } } // namespace numeric, namespace boost

-[heading Math Functions used by the rounder policies]
+[heading Math Functions used by the rounder policies 舍入器策略所使用的数学 函数]

The rounder policies supplied by this header use math functions `floor()` and `ceil()`. The standard versions of these functions are introduced in context by a using directive,
-so in normal conditions, the standard functions will be used.
+so in normal conditions, the standard functions will be used.\n
+这个头文件所提供的舍入器策略使用了数学函数 `floor()` 和 `ceil()`。
+这些函数的标准版本是通过一个 using 指令引入到上下文中的,所以在正常情况 下,将使用标准函数。

However, if there are other visible corresponding overloads an ambiguity could arise. In this case, the user can supply her own rounder policy which could, for instance,
-use a fully qualified call.
+use a fully qualified call.\n
+但是,如果存在其它可见的重载函数,将发生歧义。这种情况下,用户可以提供自己 的舍入器策略,例如使用一个全限定调用。

 This technique allows the default rounder policies to be used directly with
user defined types. The user only requires that suitable overloads of `floor()` and `ceil()` be visible. See also [link boost_numericconversion.type_requirements_and_user_defined_types_support User Defined Numeric Types]
-support.
+support.\n
+这一技术允许缺省的舍入器策略直接用于用户自定义类型。用户只要求适当的 `floor()` 和 `ceil()` 重载是可见的。 +请参见 [link boost_numericconversion.type_requirements_and_user_defined_types_support 用 户自定义数字类型的支持]。

 [endsect]

-[section Policy RawConverter]
+[section:policy_rawconverter Policy RawConverter 策略RawConverter]

 This ['stateless] template policy class is used to perform the
 actual conversion from Source to Target. It supplies the
 `low_level_convert()` static member function exposed by the
-converter, which means that it publicly inherits from this policy.
-
-The policy must have the following interface:
+converter, which means that it publicly inherits from this policy.\n
+这个['无状态]模板策略类用于执行从源类型到目标类型的实际转换。它提供了由转换 器所暴露的 `low_level_convert()` 静态成员函数,
+即转换器是公有地继承自该策略的。
+
+The policy must have the following interface:\n
+该策略必须具有以下接口:

     template<class Traits>
     struct YourRawConverterPolicy
@@ -243,9 +269,11 @@
     } ;


-This policy is mostly provided as a hook for user defined types which don't support `static_cast<>` conversions to some types
-
-This is the only raw converter policy class provided by the library:
+This policy is mostly provided as a hook for user defined types which don't support `static_cast<>` conversions to some types\n +对于不支持 `static_cast<>` 转换为某些类型的用户自定义类型,通常将这一策略作 为一个吊钩提供。
+
+This is the only raw converter policy class provided by the library:\n
+以下是本库提供的唯一一个原始转换器策略类:

     namespace boost { namespace numeric {

@@ -265,16 +293,19 @@

 [endsect]

-[section Policy UserRangeChecker]
+[section:policy_userrangechecker Policy UserRangeChecker 策略 UserRangeChecker ]

 This ['stateless] template policy class is used [_only if supplied]
-to [*override] the internal range checking logic.
+to [*override] the internal range checking logic.\n
+这个['无状态]模板策略类[_仅当]要[*重载]内部的范围检查逻辑时使用。

 It supplies the `validate_range()` static member function
 exposed by the converter, which means that it publicly inherits
-from this policy.
-
-The policy must have the following interface:
+from this policy.\n
+它提供了由转换器所暴露的 `validate_range()` 静态成员函数,即转换器是公有地 继承自该策略的。
+
+The policy must have the following interface:\n
+该策略必须具有以下接口:

     template<class Traits>
     struct YourRangeCheckerPolicy
@@ -282,10 +313,12 @@
         typedef typename Traits::argument_type argument_type ;

// Determines if the value 's' fits in the range of the Target type.
+        // 判断值 's' 是否适合目标类型的范围
         static range_check_result out_of_range ( argument_type s ) ;

         // Checks whether the value 's' is out_of_range()
// and passes the result of the check to the OverflowHandler policy. + // 检查值 's' 是否为 out_of_range(),并将检查结果传递给 OverflowHandler 策略。
         static void validate_range ( argument_type s )
         {
             OverflowHandler()( out_of_range(s) ) ;
@@ -297,7 +330,9 @@
 range checking (which is disabled by default when a UDT is involved).
The library provides a class: `UseInternalRangeChecker{}`; which is a ['fake]
 `RangeChecker` policy used to signal the converter to use its internal
-range checking implementation.
+range checking implementation.\n
+该策略[*仅]对需要范围检查(当涉及UDT时,缺省是禁用范围检查的)的用户自定义类 型作为一个吊钩提供。 +本库提供了一个类:`UseInternalRangeChecker{}`; 它是一个['假的] `RangeChecker` 策略,用于通知转换器使用内部的范围检查实现。

 [endsect]

=======================================
--- /trunk/libs/numeric/conversion/doc/definitions.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/definitions.qbk Mon Mar 22 20:44:11 2010
@@ -9,184 +9,240 @@
 ]


-[section Definitions]
-
-[section Introduction]
-
-This section provides definitions of terms used in the Numeric Conversion library.
+[section:definitions Definitions 定义]
+
+[section:introduction Introduction 简介]
+
+This section provides definitions of terms used in the Numeric Conversion library.\n
+本节提供了在 Numeric Conversion 库中所使用的术语的定义。

 [blurb [*Notation]
-[_underlined text] denotes terms defined in the C++ standard.
-
-[*bold face] denotes terms defined here but not in the standard.
+[_underlined text] denotes terms defined in the C++ standard.\n
+[*记号] [_带下划线的文字] 表示在C++标准中定义的术语。
+
+[*bold face] denotes terms defined here but not in the standard.\n
+[*黒体字] 表示在本文中定义而标准中没有的术语。
 ]

 [endsect]

-[section Types and Values]
+[section:types_and_values Types and Values 类型与值]

As defined by the [_C++ Object Model] (§1.7) the [_storage] or memory on which a
 C++ program runs is a contiguous sequence of [_bytes] where each byte is a
-contiguous sequence of bits.
-
-An [_object] is a region of storage (§1.8) and has a type (§3.9).
-
-A [_type] is a discrete set of values.
+contiguous sequence of bits.\n
+如 [_C++对象模型] (§1.7) 中所定义的,一个C++程序运行于其上的 [_存储] 或内存 是指一段连续的 [_字节],其中每个字节都是一段连续的二进制位。
+
+An [_object] is a region of storage (§1.8) and has a type (§3.9).\n
+一个 [_对象] 是指一块存储(§1.8),它具有某种类型(§3.9)。
+
+A [_type] is a discrete set of values.\n
+一个 [_类型] 是指多个值的一个离散集。

An object of type `T` has an [_object representation] which is the sequence of
-bytes stored in the object (§3.9/4)
+bytes stored in the object (§3.9/4)\n
+类型 `T` 的一个对象有一个 [_对象表示法],即保存在该对象中的一段字节(§3.9/4)

 An object of type `T` has a [_value representation] which is the set of
 bits that determine the ['value] of an object of that type (§3.9/4).
For [_POD] types (§3.9/10), this bitset is given by the object representation,
 but not all the bits in the storage need to participate in the value
 representation (except for character types): for example, some bits might
-be used for padding or there may be trap-bits.
+be used for padding or there may be trap-bits.\n
+类型 `T` 的一个对象有一个 [_值表示法],即一组二进制位的集合,它决定了该类型 的一个对象的['值](§3.9/4)。 +对于 [_POD] 类型(§3.9/10),这个位集合就是由对象表示法所给定的,但不是在存储 中的每个二进制位都需要用于值表示法(除了字符类型以外):
+例如,有些二进制位可能被用于填充或者是 trap-bits。

 __SPACE__

The [*typed value] that is held by an object is the value which is determined
-by its value representation.
+by its value representation.\n
+由一个对象所持有的 [*有类型值] 即是由它的值表示法所确定的值。

 An [*abstract value] (untyped) is the conceptual information that is
-represented in a type (i.e. the number π).
+represented in a type (i.e. the number π).\n
+[*抽象值] (无类型的) 是指在类型中所表示的概念上的信息(如数字 π)。

 The [*intrinsic value] of an object is the binary value of the sequence of
-unsigned characters which form its object representation.
+unsigned characters which form its object representation.\n
+一个对象的 [*固有值] 是指形成其对象表示法的一串无符号字符的二进制值。

 __SPACE__

-['Abstract] values can be [*represented] in a given type.
+['Abstract] values can be [*represented] in a given type.\n
+['抽象值] 可以在一个给定类型中进行 [*表示]。

To [*represent] an abstract value `V` in a type `T` is to obtain a typed value
-`v` which corresponds to the abstract value `V`.
+`v` which corresponds to the abstract value `V`.\n
+在类型 `T` 中 [*表示] 抽象值 `V` 是指,获得一个有类型值 `v`,它对应于抽象 值 `V`.

 The operation is denoted using the `rep()` operator, as in: `v=rep(V)`.
-`v` is the [*representation] of `V` in the type `T`.
+`v` is the [*representation] of `V` in the type `T`.\n
+这一操作用 `rep()` 操作符来表示,如:`v=rep(V)`. `v` 是在类型 `T` 中的 `V` 的 [*表示法]。

 For example, the abstract value π can be represented in the type
 `double` as the `double value M_PI` and in the type `int` as the
-`int value 3`
+`int value 3`\n
+例如,抽象值 π 可以在类型 `double` 中表示为 `double value M_PI`,而在类型 `int` 中表示为 `int value 3`

 __SPACE__

-Conversely, ['typed values] can be [*abstracted].
+Conversely, ['typed values] can be [*abstracted].\n
+反之,['有类型值] 也可以被 [*抽象]。

To [*abstract] a typed value `v` of type `T` is to obtain the abstract value `V`
-whose representation in `T` is `v`.
-
-The operation is denoted using the `abt()` operator, as in: `V=abt(v)`.
-
-`V` is the [*abstraction] of `v` of type `T`.
+whose representation in `T` is `v`.\n
+要 [*抽象] 类型 `T` 的一个有类型值 `v`,就是得到一个在 `T` 中表示 `v` 的抽 象值 `V`。
+
+The operation is denoted using the `abt()` operator, as in: `V=abt(v)`.\n
+这一操作用 `abt()` 操作符来表示,如:`V=abt(v)`.
+
+`V` is the [*abstraction] of `v` of type `T`.\n
+`V` 是类型 `T` 的 `v` 值的 [*抽象]。

 Abstraction is just an abstract operation (you can't do it); but it is
 defined nevertheless because it will be used to give the definitions in the
-rest of this document.
+rest of this document.\n
+抽象只是一个抽象的操作(你不能执行它);但是我们仍然对它进行定义,因为它可以 用于为本文档的其余部分给出定义。

 [endsect]

-[section C++ Arithmetic Types]
+[section:c___arithmetic_types C++ Arithmetic Types  C++算术类型]

The C++ language defines [_fundamental types] (§3.9.1). The following subsets of
-the fundamental types are intended to represent ['numbers]:
+the fundamental types are intended to represent ['numbers]:\n
+C++ 语言定义了一些 [_基本类型] (§3.9.1)。以下是基本类型的一个子集,它们用于 表示 ['数字]:

 [variablelist
-[[[_signed integer types] (§3.9.1/2):][
+[[[_signed integer types 有符号整数类型] (§3.9.1/2):][
 `{signed char, signed short int, signed int, signed long int}`
-Can be used to represent general integer numbers (both negative and positive). +Can be used to represent general integer numbers (both negative and positive).\n +`{signed char, signed short int, signed int, signed long int}` 可用于表示普 通的整数(包括负数和正数)。
 ]]
-[[[_unsigned integer types] (§3.9.1/3):][
+[[[_unsigned integer types 无符号整数类型] (§3.9.1/3):][
 `{unsigned char, unsigned short int, unsigned int, unsigned long int}`
-Can be used to represent positive integer numbers with modulo-arithmetic.
+Can be used to represent positive integer numbers with modulo-arithmetic.\n
+`{unsigned char, unsigned short int, unsigned int, unsigned long int}` 可用 于表示模算术中的正整数。
 ]]
-[[[_floating-point types] (§3.9.1/8):][
+[[[_floating-point types 浮点类型] (§3.9.1/8):][
 `{float,double,long double}`
-Can be used to represent real numbers.
+Can be used to represent real numbers.\n
+`{float,double,long double}` 可用于表示实数。
 ]]
-[[[_integral or integer types] (§3.9.1/7):][
+[[[_integral or integer types 整型或整数类型] (§3.9.1/7):][
 `{{signed integers},{unsigned integers}, bool, char and wchar_t}`
 ]]
-[[[_arithmetic types] (§3.9.1/8):][
+[[[_arithmetic types 算术类型] (§3.9.1/8):][
 `{{integer types},{floating types}}`
 ]]
 ]

-The integer types are required to have a ['binary] value representation.
+The integer types are required to have a ['binary] value representation.\n
+整数类型要求具有一个 ['二进制] 的值表示法。

 Additionally, the signed/unsigned integer types of the same base type
(`short`, `int` or `long`) are required to have the same value representation,
-that is:
+that is:\n
+另外,相同基本类型(`short`, `int` 或 `long`) 的有符号/无符号整数类型要求具 有相同的值表示法,即:

int i = -3 ; // suppose value representation is: 10011 (sign bit + 4 magnitude bits)
+             // 假设值表示法为:10011 (符号位 + 4 数量位)
unsigned int u = i ; // u is required to have the same 10011 as its value representation.
+    // u 被要求具有与 10011 相同的值表示法

 In other words, the integer types signed/unsigned X use the same value
 representation but a different ['interpretation] of it; that is, their
-['typed values] might differ.
+['typed values] might differ.\n
+换言之,整数类型 signed/unsigned X 使用相同的值表示法,但有不同的 ['解释 ];即它们的 ['有类型值] 可能不同。

Another consequence of this is that the range for signed X is always a smaller
-subset of the range of unsigned X, as required by §3.9.1/3.
+subset of the range of unsigned X, as required by §3.9.1/3.\n
+这一要求的另一个推论是,signed X 的范围总是 unsigned X 的范围的一个小子 集,正如 §3.9.1/3 所要求的。

 [note
Always remember that unsigned types, unlike signed types, have modulo-arithmetic;
 that is, they do not overflow.
-This means that:
-
-[*-] Always be extra careful when mixing signed/unsigned types
+This means that:\n
+请一定记住,无符号类型不象有符号类型,它具有模算术;即它们不会溢出。这意味 着:
+
+[*-] Always be extra careful when mixing signed/unsigned types\n
+[*-] 在混合使用有符号/无符号类型时,一定要额外小心

[*-] Use unsigned types only when you need modulo arithmetic or very very large
 numbers. Don't use unsigned types just because you intend to deal with
-positive values only (you can do this with signed types as well).
+positive values only (you can do this with signed types as well).\n
+[*-] 仅在你需要模算术或需要很大很大的数字时,才使用无符号类型。不要只是因为 你想处理正整数而使用无符号类型(你可以用有符号类型来处理)。
 ]


 [endsect]

-[section Numeric Types]
+[section:numeric_types Numeric Types 数字类型]

 This section introduces the following definitions intended to integrate
 arithmetic types with user-defined types which behave like numbers.
 Some definitions are purposely broad in order to include a vast variety of
-user-defined number types.
-
-Within this library, the term ['number] refers to an abstract numeric value.
-
-A type is [*numeric] if:
-
-* It is an arithmetic type, or,
-* It is a user-defined type which
-    * Represents numeric abstract values (i.e. numbers).
- * Can be converted (either implicitly or explicitly) to/from at least one arithmetic type.
+user-defined number types.\n
+本节介绍以下定义,目的是将算术类型与行为与数字一样的用户自定义类型相集成。 有些定义被故意放宽,以包容大量的用户自定义数字类型。
+
+Within this library, the term ['number] refers to an abstract numeric value.\n
+在本库中,术语 ['数字] 是指一个抽象的数字值。
+
+A type is [*numeric] if:\n
+一个类型是 ['数字类型],如果:
+
+* It is an arithmetic type, or,\n
+  它是一个算术类型,或者,
+* It is a user-defined type which\n
+  它是一个用户自定义类型,满足
+    * Represents numeric abstract values (i.e. numbers).\n
+      它表示了数字抽象值(如多位数字)。
+ * Can be converted (either implicitly or explicitly) to/from at least one arithmetic type.\n
+      它可以与至少一种算术类型相互转换(隐式或显式)。
* Has [link boost_numericconversion.definitions.range_and_precision range] (possibly unbounded) and [link boost_numericconversion.definitions.range_and_precision precision] (possibly dynamic or
-      unlimited).
-    * Provides an specialization of `std::numeric_limits`.
-
-A numeric type is [*signed] if the abstract values it represent include negative numbers.
-
-A numeric type is [*unsigned] if the abstract values it represent exclude negative numbers.
-
-A numeric type is [*modulo] if it has modulo-arithmetic (does not overflow).
-
-A numeric type is [*integer] if the abstract values it represent are whole numbers.
-
-A numeric type is [*floating] if the abstract values it represent are real numbers.
-
-An [*arithmetic value] is the typed value of an arithmetic type
-
-A [*numeric value] is the typed value of a numeric type
+      unlimited).\n
+ 它具有 [link boost_numericconversion.definitions.range_and_precision 范围] (可能是无界的)和 + [link boost_numericconversion.definitions.range_and_precision 精度] (可能是动态或无限的)。
+    * Provides an specialization of `std::numeric_limits`.\n
+      它提供了对 `std::numeric_limits` 的特化。
+
+A numeric type is [*signed] if the abstract values it represent include negative numbers.\n
+一个数字类型是 [*有符号的],如果它所表示的抽象值包括负数。
+
+A numeric type is [*unsigned] if the abstract values it represent exclude negative numbers.\n
+一个数字类型是 [*无符号的],如果它所表示的抽象值不包括负数。
+
+A numeric type is [*modulo] if it has modulo-arithmetic (does not overflow).\n
+一个数字类型是 [*带模的],如果它具有模算术(不会溢出)。
+
+A numeric type is [*integer] if the abstract values it represent are whole numbers.\n
+一个数字类型是 [*整型的],如果它所表示的抽象值是整数。
+
+A numeric type is [*floating] if the abstract values it represent are real numbers.\n
+一个数字类型是 [*浮点型的],如果它所表示的抽象值是实数。
+
+An [*arithmetic value] is the typed value of an arithmetic type\n
+[*算术值] 是指算术类型的有类型值。
+
+A [*numeric value] is the typed value of a numeric type\n
+[*数字值] 是指数字类型的有类型值。

These definitions simply generalize the standard notions of arithmetic types and values by introducing a superset called [_numeric]. All arithmetic types and values are numeric types and values, but not vice versa, since user-defined numeric types are not
-arithmetic types.
+arithmetic types.\n
+这些定义只是通过引用一个名为 [_数字] 的超集,对标准中的算术类型和算术值进行 了泛化。 +所有算术类型和算术值都是数字类型和数字值,但反之不然,因为用户自定义的数字 类型不是算术类型。

The following examples clarify the differences between arithmetic and numeric
-types (and values):
+types (and values):\n
+以下例子说明了算术类型(和算术值)和数字类型(和数字值)间的差异:


     // A numeric type which is not an arithmetic type (is user-defined)
// and which is intended to represent integer numbers (i.e., an 'integer' numeric type) + // 一个不是算术类型的数字类型(用户自定义的),它用于表示整数(即一个'整 型'的数字类型)
     class MyInt
     {
         MyInt ( long long v ) ;
@@ -198,46 +254,59 @@

// A 'floating' numeric type (double) which is also an arithmetic type (built-in),
     // with a float numeric value.
+ // 一个'浮点'的数字类型(double),同时也是算术类型(内建的),具有浮点数 值。
     double pi = M_PI ;

     // A 'floating' numeric type with a whole numeric value.
// NOTE: numeric values are typed valued, hence, they are, for instance, // integer or floating, despite the value itself being whole or including
     // a fractional part.
+ // 一个具有整数值的'浮点'数字类型。注:数字值是有类型值,因此它们是整型 的或浮点型的,
+    // 无论它的值本身是整数的还是带有小数的。
     double two = 2.0 ;

     // An integer numeric type with an integer numeric value.
+    // 一个具有整型数字值的整型数字类型。
     MyInt i(1234);


 [endsect]

-[section Range and Precision]
-
-Given a number set `N`, some of its elements are representable in a numeric type `T`.
+[section:range_and_precision Range and Precision 范围与精度]
+
+Given a number set `N`, some of its elements are representable in a numeric type `T`.\n
+给定一个数字集合 `N`,它的一些元素可以在数字类型 `T` 中表示。

The set of representable values of type `T`, or numeric set of `T`, is a set of numeric
-values whose elements are the representation of some subset of `N`.
+values whose elements are the representation of some subset of `N`.\n
+类型 `T` 可表示的值的集合,或者说 `T` 的数字集合,是指一个数字值的集合,其 中的元素是 `N` 的某个子集的表示法。

For example, the interval of `int` values `[INT_MIN,INT_MAX]` is the set of representable values of type `int`, i.e. the `int` numeric set, and corresponds to the representation of the elements of the interval of abstract values `[abt(INT_MIN),abt(INT_MAX)]` from
-the integer numbers.
+the integer numbers.\n
+例如,`int` 值区间 `[INT_MIN,INT_MAX]` 就是类型 `int` 的可表示值的集合,也 就是 `int` 数字集合, +它对应于来自于整数抽象值区间 `[abt(INT_MIN),abt(INT_MAX)]` 的各元素的表示 法。

Similarly, the interval of `double` values `[-DBL_MAX,DBL_MAX]` is the `double` numeric set, which corresponds to the subset of the real numbers from `abt(-DBL_MAX)` to
-`abt(DBL_MAX)`.
+`abt(DBL_MAX)`.\n
+类似地,`double` 值区间 `[-DBL_MAX,DBL_MAX]` 是 `double` 数字集合,它对应于 从 `abt(-DBL_MAX)` 到 `abt(DBL_MAX)` 的实数的一个子集。

 __SPACE__

-Let [*`next(x)`] denote the lowest numeric value greater than x.
-
-Let [*`prev(x)`] denote the highest numeric value lower then x.
+Let [*`next(x)`] denote the lowest numeric value greater than x.\n
+用 [*`next(x)`] 表示大于 x 的最小数字值。
+
+Let [*`prev(x)`] denote the highest numeric value lower then x.\n
+用 [*`prev(x)`] 表示小于 x 的最大数字值。

Let [*`v=prev(next(V))`] and [*`v=next(prev(V))`] be identities that relate a numeric
-typed value `v` with a number `V`.
-
-An ordered pair of numeric values `x`,`y` s.t. `x<y` are [*consecutive] iff `next(x)==y`.
+typed value `v` with a number `V`.\n
+令 [*`v=prev(next(V))`] 和 [*`v=next(prev(V))`] 是相同的,将一个数字类型值 `v` 与一个数字 `V` 关联起来。
+
+An ordered pair of numeric values `x`,`y` s.t. `x<y` are [*consecutive] iff `next(x)==y`.\n
+一个有序的数字值对 `x`,`y` s.t. `x<y` 是 [*连续的] 当且仅当 `next(x)==y`.

The abstract distance between consecutive numeric values is usually referred to as a [_Unit in the Last Place], or [*ulp] for short. A ulp is a quantity whose abstract
@@ -245,217 +314,294 @@
is not evenly distributed, that is, if the abstract distance between consecutive numeric values varies along the set -as is the case with the floating-point types-, the magnitude of 1ulp after the numeric value `x` might be (usually is) different
-from the magnitude of a 1ulp after the numeric value y for `x!=y`.
+from the magnitude of a 1ulp after the numeric value y for `x!=y`.\n
+两个连续数字值之间的抽象距离通常被称为 [_最小单元],或简称 [*ulp]。ulp 是一 个与相应数字值相关的抽象量: +如果这个数字集合不是均匀分布的,即在集合中的两个连续数字值之间的抽象距离是 变化的 -就象浮点类型那样-, +那么在数字值 `x` 之后的1个ulp可能会(通常都会)不同于另一个数字值 `y` 之后的 1个ulp,如果 `x!=y`。

Since numbers are inherently ordered, a [*numeric set] of type `T` is an ordered sequence
-of numeric values (of type `T`) of the form:
+of numeric values (of type `T`) of the form:\n
+因为数字是有序的,所以类型 `T` 的 [*数字集合] 就是一组数字值(类型为 `T`)的 有序排列,形如:

     REP(T)={l,next(l),next(next(l)),...,prev(prev(h)),prev(h),h}

where `l` and `h` are respectively the lowest and highest values of type `T`, called
-the boundary values of type `T`.
+the boundary values of type `T`.\n
+其中 `l` 和 `h` 分别为类型 `T` 的最小值和最大值,称为类型 `T` 的边界值。

 __SPACE__

A numeric set is discrete. It has a [*size] which is the number of numeric values in the set, a [*width] which is the abstract difference between the highest and lowest boundary values: `[abt(h)-abt(l)]`, and a [*density] which is the relation between its size and width:
-`density=size/width`.
+`density=size/width`.\n
+数字集合是离散的。它具有一定的 [*大小] 即该集合中的数字值的数量,还有一定 的 [*广度] 即最大值和最小值之间的抽象距离: +`[abt(h)-abt(l)]`,还有一定的 [*密度] 即它的大小与广度之 比:`density=size/width`.

The integer types have density 1, which means that there are no unrepresentable integer numbers between `abt(l)` and `abt(h)` (i.e. there are no gaps). On the other hand, floating types have density much smaller than 1, which means that there are real numbers
-unrepresented between consecutive floating values (i.e. there are gaps).
+unrepresented between consecutive floating values (i.e. there are gaps).\n
+整数类型的密度为1,这意味着在 `abt(l)` 和 `abt(h)` 之间没有不可表示的整数 (即没有间隙)。 +另一方面,浮点类型的密度远小于1,这意味着在相邻的浮点值之间存在无法表示的实 数(即有一定间隙)。

 __SPACE__

The interval of [_abstract values] `[abt(l),abt(h)]` is the range of the type `T`,
-denoted `R(T)`.
+denoted `R(T)`.\n
+[_抽象值] `[abt(l),abt(h)]` 的区间称为类型 `T` 的范围,记为 `R(T)`.

A range is a set of abstract values and not a set of numeric values. In other documents, such as the C++ standard, the word `range` is ['sometimes] used as synonym for `numeric set`, that is, as the ordered sequence of numeric values from `l` to `h`. In this document, however, a range is an abstract interval which subtends the
-numeric set.
+numeric set.\n
+范围是指一组抽象值的集合而不是一组数字值的集合。在其它文档中,如C++标准,单 词 `range` ['有时]被用作 `numeric set` 的同义词, +即从 `l` 到 `h` 的数字值的有序排列。不过在这个文档中,范围指的是一个抽象区 间,它包含了数字集合。

For example, the sequence `[-DBL_MAX,DBL_MAX]` is the numeric set of the type -`double`, and the real interval `[abt(-DBL_MAX),abt(DBL_MAX)]` is its range. +`double`, and the real interval `[abt(-DBL_MAX),abt(DBL_MAX)]` is its range.\n +例如,序列 `[-DBL_MAX,DBL_MAX]` 是类型 `double` 的数字集合,而实数区间 `[abt(-DBL_MAX),abt(DBL_MAX)]` 则是它的范围。

Notice, for instance, that the range of a floating-point type is ['continuous]
-unlike its numeric set.
-
-This definition was chosen because:
-
-* [*(a)] The discrete set of numeric values is already given by the numeric set.
+unlike its numeric set.\n
+注意,浮点类型的范围是 ['连续的],与它的数字集合不同。
+
+This definition was chosen because:\n
+之所以选择这种定义,是因为:
+
+* [*(a)] The discrete set of numeric values is already given by the numeric set.\n
+  [*(a)] 数字值的离散集已经由数字集合给出。
* [*(b)] Abstract intervals are easier to compare and overlap since only boundary
-values need to be considered.
-
-This definition allows for a concise definition of `subranged` as given in the last section.
-
-The width of a numeric set, as defined, is exactly equivalent to the width of a range.
+values need to be considered.\n
+  [*(b)] 抽象区间更易于比较和取交集,因为只需要考虑其边界值即可。
+
+This definition allows for a concise definition of `subranged` as given in the last section.\n
+这种定义可以很简明地定义下一节所给出的 `subranged`。
+
+The width of a numeric set, as defined, is exactly equivalent to the width of a range.\n
+按定义,数字集合的广度与范围的广度精确相等。

 __SPACE__

-The [*precision] of a type is given by the width or density of the numeric set. +The [*precision] of a type is given by the width or density of the numeric set.\n
+一个类型的 [*精度] 由数字集合的广度或密度给定。

For integer types, which have density 1, the precision is conceptually equivalent to the range and is determined by the number of bits used in the value representation: The higher the number of bits the bigger the size of the numeric set, the wider the
-range, and the higher the precision.
+range, and the higher the precision.\n
+对于密度为1的整数类型,精度在概念上相当于范围,它由值表示法所用的二进制位数 量所决定:
+二进制位数量越多则数字集合的大小越大,范围的广度越广,精度也越高。

For floating types, which have density <<1, the precision is given not by the width of the range but by the density. In a typical implementation, the range is determined by the number of bits used in the exponent, and the precision by the number of bits used in the mantissa (giving the maximum number of significant digits that can be exactly represented). The higher the number of exponent bits the wider the range,
-while the higher the number of mantissa bits, the higher the precision.
+while the higher the number of mantissa bits, the higher the precision.\n
+对于密度<<1的浮点类型,精度不是由范围的广度给定,而是由密度给定。在一个典型 的实现中, +范围是由用于表示指数的二进制位数量所决定,而精度是由用于表示尾数(给出了可以 精确表示的有效数字的最大位数)的二进制位数量所决定。
+表示指数的二进制位数量越多则范围越广,而尾数的二进制位数量越多则精度越高。

 [endsect]

-[section Exact, Correctly Rounded and Out-Of-Range Representations]
-
-Given an abstract value `V` and a type `T` with its corresponding range `[abt(l),abt(h)]`: +[section:exact__correctly_rounded_and_out_of_range_representations Exact, Correctly Rounded and Out-Of-Range Representations
+精确的、适当舍入的和超出范围的表示法]
+
+Given an abstract value `V` and a type `T` with its corresponding range `[abt(l),abt(h)]`:\n
+给定一个抽象角 `V` 和一个范围为 `[abt(l),abt(h)]` 的类型 `T`:

If `V < abt(l)` or `V > abt(h)`, `V` is [*not representable] (cannot be represented) in the type `T`, or, equivalently, it's representation in the type `T` is [*out of range],
-or [*overflows].
-
-* If `V < abt(l)`, the [*overflow is negative].
-* If `V > abt(h)`, the [*overflow is positive].
+or [*overflows].\n
+如果 `V < abt(l)` 或 `V > abt(h)`,则 `V` 在类型 `T` 中是 [*不可表示的](不 能被表示出来),或者说,
+它在类型 `T` 中的表示是 [*超出范围的],或是 [*溢出的]。
+
+* If `V < abt(l)`, the [*overflow is negative].\n
+  如果 `V < abt(l)`,则 [*溢出为负]。
+* If `V > abt(h)`, the [*overflow is positive].\n
+  如果 `V > abt(h)`,则 [*溢出为正]。

If `V >= abt(l)` and `V <= abt(h)`, `V` is [*representable] (can be represented) in the type `T`, or, equivalently, its representation in the type `T` is [*in range], or
-[*does not overflow].
+[*does not overflow].\n
+如果 `V >= abt(l)` 且 `V <= abt(h)`,则 `V` 在类型 `T` 中是 [*可表示的](可 以被表示出来),
+或者说它在类型 `T` 中的表示是 [*在范围内的],或是 [*未溢出的]。

Notice that a numeric type, such as a C++ unsigned type, can define that any `V` does
 not overflow by always representing not `V` itself but the abstract value
-`U = [ V % (abt(h)+1) ]`, which is always in range.
+`U = [ V % (abt(h)+1) ]`, which is always in range.\n
+注意,一个数字类型,如C++中的无符号类型,可以定义为任意 `V` 都不会溢出,
+它的表示不是 `V` 本身而是抽象值 `U = [ V % (abt(h)+1) ]`,这个值总是在范围 内的。

Given an abstract value `V` represented in the type `T` as `v`, the [*roundoff] error
-of the representation is the abstract difference: `(abt(v)-V)`.
+of the representation is the abstract difference: `(abt(v)-V)`.\n
+给定一个在类型 `T` 中表示为 `v` 的抽象值 `V`,该表示法的 [*舍入] 误差是指抽 象距离:`(abt(v)-V)`.

Notice that a representation is an ['operation], hence, the roundoff error corresponds
 to the representation operation and not to the numeric value itself
-(i.e. numeric values do not have any error themselves)
+(i.e. numeric values do not have any error themselves)\n
+注意,一个表示法是一个 ['操作],因此舍入误差是对应于该表示法操作而不是对应 于数字值本身(即数字值本身不存在误差)。

* If the roundoff is 0, the representation is [*exact], and `V` is exactly representable
-in the type `T`.
+in the type `T`.\n
+  如果舍入为0,则表示是 [*精确的],`V` 在类型 `T` 中可以精确表示。
* If the roundoff is not 0, the representation is [*inexact], and `V` is inexactly
-representable in the type `T`.
+representable in the type `T`.\n
+  如果舍入不是0,则表示是 [*不精确的],`V` 在类型 `T` 中不能精确表示。

If a representation `v` in a type `T` -either exact or inexact-, is any of the adjacents of `V` in that type, that is, if `v==prev` or `v==next`, the representation is
 faithfully rounded. If the choice between `prev` and `next` matches a given
-[*rounding direction], it is [*correctly rounded].
+[*rounding direction], it is [*correctly rounded].\n
+如果在类型 `T` 中的一个表示 `v` -精确或不精确的-,是该类型中的 `V` 的某个邻 值,即如果 `v==prev` 或 `v==next`, +则称该表示法是如实舍入的。如果 `prev` 和 `next` 间的选择符合一个给定的 [*舍 入方向],它就是 [*适当舍入的]。

All exact representations are correctly rounded, but not all inexact representations are. In particular, C++ requires numeric conversions (described below) and the result of arithmetic operations (not covered by this document) to be correctly rounded, but batch operations propagate roundoff, thus final results are usually incorrectly rounded, that is, the numeric value `r` which is the computed result is neither of
-the adjacents of the abstract value `R` which is the theoretical result.
+the adjacents of the abstract value `R` which is the theoretical result.\n
+所有精确的表示都是适当舍入的,但不精确表示则不都是。特别地,C++要求数字转换 (后文描述)和算术操作的结果 +(不在本文讨论范围之内)都是适当舍入的,但批量操作会传播舍入,因此最终结果通 常都不是适当舍入的,
+即计算结果数字值 `r` 不是理论结果抽象值 `R` 的邻值。

Because a correctly rounded representation is always one of adjacents of the abstract
-value being represented, the roundoff is guaranteed to be at most 1ulp.
-
-The following examples summarize the given definitions. Consider:
+value being represented, the roundoff is guaranteed to be at most 1ulp.\n
+因为一个适当舍入的表示总是被表示的抽象值的某个邻值,所以舍入值可以保证最多 为1个ulp。
+
+The following examples summarize the given definitions. Consider:\n
+以下例子总结了所给出的下定义。考虑以下类型:

 * A numeric type `Int` representing integer numbers with a
 ['numeric set]: `{-2,-1,0,1,2}` and
-['range]: `[-2,2]`
+['range]: `[-2,2]`\n
+数字类型 `Int` 表示 ['数字集合]: `{-2,-1,0,1,2}` 和 ['范围]: `[-2,2]` 的整
 * A numeric type `Cardinal` representing integer numbers with a
 ['numeric set]: `{0,1,2,3,4,5,6,7,8,9}` and
-['range]: `[0,9]` (no modulo-arithmetic here)
+['range]: `[0,9]` (no modulo-arithmetic here)\n
+数字类型 `Cardinal` 表示 ['数字集合]: {0,1,2,3,4,5,6,7,8,9} 和 ['范围]: [0,9] (不带模算术) 的整数
 * A numeric type `Real` representing real numbers with a
 ['numeric set]: `{-2.0,-1.5,-1.0,-0.5,-0.0,+0.0,+0.5,+1.0,+1.5,+2.0}` and
-['range]: `[-2.0,+2.0]`
+['range]: `[-2.0,+2.0]`\n
+数字类型 `Real` 表示 ['数字集合]: {-2.0,-1.5,-1.0,-0.5,-0.0,+0.0,+0.5,+1.0,+1.5,+2.0} 和 ['范围]: [-2.0,+2.0] 的实数
 * A numeric type `Whole` representing real numbers with a
 ['numeric set]: `{-2.0,-1.0,0.0,+1.0,+2.0}` and
-['range]: `[-2.0,+2.0]`
+['range]: `[-2.0,+2.0]`\n
+如数字类型 `Whole` 表示 ['数字集合]: {-2.0,-1.0,0.0,+1.0,+2.0} 和 ['范围]: [-2.0,+2.0] 的实数

First, notice that the types `Real` and `Whole` both represent real numbers,
-have the same range, but different precision.
+have the same range, but different precision.\n
+首先,请留意类型 `Real` 和 `Whole`,它们都表示实数,具有相同的范围,但精度 不同。

 * The integer number `1` (an abstract value) can be exactly represented
-in any of these types.
+in any of these types.\n
+整数 `1` (抽象值)可以在以上任一个类型中被精确表示。
* The integer number `-1` can be exactly represented in `Int`, `Real` and `Whole`,
-but cannot be represented in `Cardinal`, yielding negative overflow.
+but cannot be represented in `Cardinal`, yielding negative overflow.\n
+整数 `-1` 可以在 `Int`, `Real` 和 `Whole` 中被精确表示,但不能在 `Cardinal` 中表示,会产生负溢出。
 * The real number `1.5` can be exactly represented in `Real`, and inexactly
-represented in the other types.
+represented in the other types.\n
+实数 `1.5` 可以在 `Real` 中精确表示,并在其它类型中不精确地表示。
* If `1.5` is represented as either `1` or `2` in any of the types (except `Real`),
-the representation is correctly rounded.
-* If `0.5` is represented as `+1.5` in the type `Real`, it is incorrectly rounded.
+the representation is correctly rounded.\n
+如果 `1.5` 在任一类型(除了 `Real`)中被表示为 `1` 或 `2`,该表示是适当舍入 的。 +* If `0.5` is represented as `+1.5` in the type `Real`, it is incorrectly rounded.\n
+如果 `0.5` 在类型 `Real` 中被表示为 `+1.5`,则是不正确舍入的。
 * `(-2.0,-1.5)` are the `Real` adjacents of any real number in the interval
-`[-2.0,-1.5]`, yet there are no `Real` adjacents for `x < -2.0`, nor for `x > +2.0`. +`[-2.0,-1.5]`, yet there are no `Real` adjacents for `x < -2.0`, nor for `x > +2.0`.\n +`(-2.0,-1.5)` 是区间 `[-2.0,-1.5]` 中任一实数的 `Real` 邻值,但是对于 `x < -2.0`, 和 `x > +2.0` 则没有 `Real` 邻值。

 [endsect]

-[section Standard (numeric) Conversions]
+[section:standard__numeric__conversions Standard (numeric) Conversions 标准 的(数字)转换]

The C++ language defines [_Standard Conversions] (§4) some of which are conversions
-between arithmetic types.
+between arithmetic types.\n
+C++语言定义了 [_标准转换] (§4),其中包括算术类型间的转换。

 These are [_Integral promotions] (§4.5), [_Integral conversions] (§4.7),
[_Floating point promotions] (§4.6), [_Floating point conversions] (§4.8) and
-[_Floating-integral conversions] (§4.9).
+[_Floating-integral conversions] (§4.9).\n
+包括有 [_整型提升] (§4.5),[_整型转换] (§4.7),[_浮点提升] (§4.6),[_浮点转 换] (§4.8) 和 [_浮点-整型转换] (§4.9)。

In the sequel, integral and floating point promotions are called [*arithmetic promotions], and these plus integral, floating-point and floating-integral conversions are called
-[*arithmetic conversions] (i.e, promotions are conversions).
+[*arithmetic conversions] (i.e, promotions are conversions).\n
+概括来说,整型和浮点提升被称为 [*算术提升],它们再加上整型、浮点和浮点-整型 转换,被称为 [*算术转换] (即提升也是一种转换)。

Promotions, both Integral and Floating point, are ['value-preserving], which means that
-the typed value is not changed with the conversion.
+the typed value is not changed with the conversion.\n
+整型和浮点型的提升都是 ['保留原值的],即在转换后有类型值不会被更改。

In the sequel, consider a source typed value `s` of type `S`, the source abstract value `N=abt(s)`, a destination type `T`; and whenever possible, a result typed value
-`t` of type `T`.
+`t` of type `T`.\n
+概括来说,考虑一个源类型 `S` 的有类型值 `s`,源抽象值 `N=abt(s)`,目标类型 为 `T`;如果能够转换,则结果是类型为 `T` 的有类型值 `t`。


-Integer to integer conversions are always defined:
+Integer to integer conversions are always defined:\n
+整数到整数的转换总是有定义的:

* If `T` is unsigned, the abstract value which is effectively represented is not
 `N` but `M=[ N % ( abt(h) + 1 ) ]`, where `h` is the highest unsigned typed
-value of type `T`.
+value of type `T`.\n
+如果 `T` 是无符号的,则有效表示的抽象值不是 `N` 而是 `M=[ N % ( abt(h) + 1 ) ]`,其中 `h` 是类型 `T` 的最大无符号有类型值。
 * If `T` is signed and `N` is not directly representable, the result `t` is
[_implementation-defined], which means that the C++ implementation is required to
-produce a value `t` even if it is totally unrelated to `s`.
+produce a value `t` even if it is totally unrelated to `s`.\n
+如果 `T` 是有符号的且 `N` 不是可直接表示的,则结果 `t` 是 [_依实现定义的 ],即C++实现被要求产生一个值 `t` 即使它与 `s` 完全无关。


 Floating to Floating conversions are defined only if `N` is representable;
-if it is not, the conversion has [_undefined behavior].
-
-* If `N` is exactly representable, `t` is required to be the exact representation.
+if it is not, the conversion has [_undefined behavior].\n
+浮点数到浮点数的转换仅当 `N` 是可表示时有定义;否则转换就是 [_未定义行为]。
+
+* If `N` is exactly representable, `t` is required to be the exact representation.\n
+  如果 `N` 是可以精确表示的,则要求 `t` 是精确表示。
 * If `N` is inexactly representable, `t` is required to be one of the two
 adjacents, with an implementation-defined choice of rounding direction;
-that is, the conversion is required to be correctly rounded.
+that is, the conversion is required to be correctly rounded.\n
+ 如果 `N` 是不可精确表示的,则要求 `t` 是两个邻值之一,舍入的方向由实现定 义来选择;即要求转换是适当舍入的。


 Floating to Integer conversions represent not `N` but `M=trunc(N)`, were
-`trunc()` is to truncate: i.e. to remove the fractional part, if any.
+`trunc()` is to truncate: i.e. to remove the fractional part, if any.\n
+浮点数到整数的转换不是 `N` 而是 `M=trunc(N)`,其中 `trunc()` 表示截断:即去 掉小数部分,如果有的话。

* If `M` is not representable in `T`, the conversion has [_undefined behavior]
-(unless `T` is `bool`, see §4.12).
+(unless `T` is `bool`, see §4.12).\n
+ 如果 `M` 在 `T` 中不可表示,则转换是 [_未定义行为] (除非 `T` 为 `bool`,请见 §4.12)。


-Integer to Floating conversions are always defined.
-
-* If `N` is exactly representable, `t` is required to be the exact representation.
+Integer to Floating conversions are always defined.\n
+整数到浮点数的转换总是有定义的。
+
+* If `N` is exactly representable, `t` is required to be the exact representation.\n
+  如果 `N` 是可精确表示的,则要求 `t` 是精确表示。
 * If `N` is inexactly representable, `t` is required to be one of the
 two adjacents, with an implementation-defined choice of rounding direction;
-that is, the conversion is required to be correctly rounded.
+that is, the conversion is required to be correctly rounded.\n
+ 如果 `N` 是不可精确表示的,则要求 `t` 是两个邻值之一,舍入的方向由实现定 义来选择;即要求转换是适当舍入的。

 [endsect]

-[section Subranged Conversion Direction, Subtype and Supertype]
+[section:subranged_conversion_direction__subtype_and_supertype Subranged Conversion Direction, Subtype and Supertype
+子范围转换方向、子类型和父类型]

 Given a source type `S` and a destination type `T`, there is a
-[*conversion direction] denoted: `S->T`.
+[*conversion direction] denoted: `S->T`.\n
+给定一个源类型 `S` 和一个目标类型 `T`,[*转换方向] 记为:`S->T`.

 For any two ranges the following ['range relation] can be defined:
 A range `X` can be ['entirely contained] in a range `Y`, in which case
-it is said that `X` is enclosed by `Y`.
-
-[: [*Formally:] `R(S)` is enclosed by `R(T)` iif `(R(S) intersection R(T)) == R(S)`.]
+it is said that `X` is enclosed by `Y`.\n
+对于任意两个范围,可以定义 ['范围关系] 如下:范围 `X` ['完全包含在] 范围 `Y` 中,则称 `X` 被 `Y` 包含。
+
+[: [*Formally:] `R(S)` is enclosed by `R(T)` iif `(R(S) intersection R(T)) == R(S)`.\n +[*正式定义]:`R(S)` 被 `R(T)` 所包含当且仅当 `(R(S) intersection R(T)) == R(S)`.]

 If the source type range, `R(S)`, is not enclosed in the target type range,
`R(T)`; that is, if `(R(S) & R(T)) != R(S)`, the conversion direction is said
@@ -464,34 +610,48 @@
the target range. In other words, if a conversion direction `S->T` is subranged,
 there are values in `S` which cannot be represented in `T` because they are
 out of range.
-Notice that for `S->T`, the adjective subranged applies to `T`.
-
-Examples:
-
-Given the following numeric types all representing real numbers:
-
-* `X` with numeric set `{-2.0,-1.0,0.0,+1.0,+2.0}` and range `[-2.0,+2.0]`
-* `Y` with numeric set `{-2.0,-1.5,-1.0,-0.5,0.0,+0.5,+1.0,+1.5,+2.0}` and range `[-2.0,+2.0]`
-* `Z` with numeric set `{-1.0,0.0,+1.0}` and range `[-1.0,+1.0]`
-
-For:
+Notice that for `S->T`, the adjective subranged applies to `T`.\n
+如果源类型范围 `R(S)`,不是被目标类型范围 `R(T)` 所包含;即如果 `(R(S) & R(T)) != R(S)`, +则转换方向被称为 [*子范围的],即 `R(S)` 不完全包含在 `R(T)` 之中,因此源范 围中有一部分落在了目标范围以外。 +换句话说,如果转换方向 `S->T` 是子范围的,则 `S` 中有些值不能在 `T` 中表 示,因为它们超出了范围。
+注意,对于 `S->T`,形容词"子范围的"是对 `T` 而言的。
+
+Examples:\n
+例子:
+
+Given the following numeric types all representing real numbers:\n
+给定以下表示实数的数字类型:
+
+* `X` with numeric set `{-2.0,-1.0,0.0,+1.0,+2.0}` and range `[-2.0,+2.0]`\n
+  `X` 的数字集合为 `{-2.0,-1.0,0.0,+1.0,+2.0}` 范围为 `[-2.0,+2.0]`
+* `Y` with numeric set `{-2.0,-1.5,-1.0,-0.5,0.0,+0.5,+1.0,+1.5,+2.0}` and range `[-2.0,+2.0]`\n + `Y` 的数字集合为 `{-2.0,-1.5,-1.0,-0.5,0.0,+0.5,+1.0,+1.5,+2.0}` 范围为 `[-2.0,+2.0]`
+* `Z` with numeric set `{-1.0,0.0,+1.0}` and range `[-1.0,+1.0]`\n
+  `Z` 的数字集合为 `{-1.0,0.0,+1.0}` 范围为 `[-1.0,+1.0]`
+
+For:\n
+对于:

 [variablelist
 [[(a) X->Y:][
 `R(X) & R(Y) == R(X)`, then `X->Y` is not subranged.
-Thus, all values of type `X` are representable in the type `Y`.
+Thus, all values of type `X` are representable in the type `Y`.\n
+`R(X) & R(Y) == R(X)`,则 `X->Y` 不是子范围的。因此,类型 `X` 的所有值在类 型 `Y` 中都可以表示。
 ]]
 [[(b) Y->X:][
 `R(Y) & R(X) == R(Y)`, then `Y->X` is not subranged.
Thus, all values of type `Y` are representable in the type `X`, but in this case,
 some values are ['inexactly] representable (all the halves).
(note: it is to permit this case that a range is an interval of abstract values and
-not an interval of typed values)
+not an interval of typed values)\n
+`R(Y) & R(X) == R(Y)`,则 `Y->X` 不是子范围的。因此,类型 `Y` 的所有值在类 型 `X` 中都可以表示, +但是有些值是 ['非精确] 表示的(所有带0.5的)。(注:可以允许这种情形,即范围是 一个抽象值的区间而不是一个有类型值的区间)
 ]]
 [[(b) X->Z:][
 `R(X) & R(Z) != R(X)`, then `X->Z` is subranged.
Thus, some values of type `X` are not representable in the type `Z`, they fall
-out of range `(-2.0 and +2.0)`.
+out of range `(-2.0 and +2.0)`.\n
+`R(X) & R(Z) != R(X)`, 则 `X->Z` 是子范围的。因此,类型 `X` 有些值在类型 `Z` 中不能表示,它们超出了 `(-2.0 and +2.0)` 的范围。
 ]]
 ]

@@ -500,40 +660,56 @@
 neither is `SIG` enclosed by `UNSIG`.
This implies that is possible that a conversion direction is subranged both ways. This occurs when a mixture of signed/unsigned types are involved and indicates that
-in both directions there are values which can fall out of range.
+in both directions there are values which can fall out of range.\n
+有可能 `R(S)` 不被 `R(T)` 所包含,而 `R(T)` 也不被 `R(S)` 所包含;例 如,`UNSIG=[0,255]` 就不被 `SIG=[-128,127]` 所包含; +同样 `SIG` 也不被 `UNSIG` 所包含。这意味着有可能转换在两个方向上都是子范围 的。 +在混合使用有符号/无符号类型时就会发生这种情况,它表示在两个方向上都有一些值 超出范围。

Given the range relation (subranged or not) of a conversion direction `S->T`, it
 is possible to classify `S` and `T` as [*supertype] and [*subtype]:
If the conversion is subranged, which means that `T` cannot represent all possible values of type `S`, `S` is the supertype and `T` the subtype; otherwise, `T` is the
-supertype and `S` the subtype.
-
-For example:
+supertype and `S` the subtype.\n
+给定一个转换方向 `S->T` 的范围关系(子范围的或不是),可以将 `S` 和 `T` 分为 [*父类型] 和 [*子类型]: +如果转换是子范围的,即 `T` 不能表示类型 `S` 的所有可能值,则 `S` 为父类型 而 `T` 为子类型;否则,`T` 为父类型而 `S` 为子类型。
+
+For example:\n
+例如:

 [: `R(float)=[-FLT_MAX,FLT_MAX]` and `R(double)=[-DBL_MAX,DBL_MAX]` ]

-If `FLT_MAX < DBL_MAX`:
-
-* `double->float` is subranged and `supertype=double`, `subtype=float`.
-* `float->double` is not subranged and `supertype=double`, `subtype=float`.
+If `FLT_MAX < DBL_MAX`:\n
+如果 `FLT_MAX < DBL_MAX`:
+
+* `double->float` is subranged and `supertype=double`, `subtype=float`.\n
+  `double->float` 是子范围的且 `supertype=double`, `subtype=float`.
+* `float->double` is not subranged and `supertype=double`, `subtype=float`.\n
+  `float->double` 不是子范围的且 `supertype=double`, `subtype=float`.

 Notice that while `double->float` is subranged, `float->double` is not,
-which yields the same supertype,subtype for both directions.
-
-Now consider:
+which yields the same supertype,subtype for both directions.\n
+注意,由于 `double->float` 是子范围的,而 `float->double` 不是,所以两个方 向均得到相同的父类型和子类型。
+
+Now consider:\n
+现在考虑:

 [: `R(int)=[INT_MIN,INT_MAX]` and `R(unsigned int)=[0,UINT_MAX]` ]

-A C++ implementation is required to have `UINT_MAX > INT_MAX` (§3.9/3), so:
+A C++ implementation is required to have `UINT_MAX > INT_MAX` (§3.9/3), so:\n
+C++ 实现要求具有 `UINT_MAX > INT_MAX` (§3.9/3),所以:

 * 'int->unsigned' is subranged (negative values fall out of range)
-and `supertype=int`, `subtype=unsigned`.
+and `supertype=int`, `subtype=unsigned`.\n
+ 'int->unsigned' 是子范围的(负值超出了范围)且 `supertype=int`, `subtype=unsigned`. * 'unsigned->int' is ['also] subranged (high positive values fall out of range)
-and `supertype=unsigned`, `subtype=int`.
+and `supertype=unsigned`, `subtype=int`.\n
+ 'unsigned->int' 也是子范围的(高位值超出了范围)且 `supertype=unsigned`, `subtype=int`.

 In this case, the conversion is subranged in both directions and the
 supertype,subtype pairs are not invariant (under inversion of direction).
-This indicates that none of the types can represent all the values of the other. +This indicates that none of the types can represent all the values of the other.\n +这种情况下,两个方向的转换都是子范围的,父类型、子类型对就不相同了(在相反的 方向)。
+这表示没有一个类型可以表示另一个类型的所有值。

When the supertype is the same for both `S->T` and `T->S`, it is effectively
 indicating a type which can represent all the values of the subtype.
@@ -541,7 +717,10 @@
so that the supertype is always `Y`, it is said that the direction `X->Y` is [*correctly rounded value preserving], meaning that all such conversions are guaranteed to
 produce results in range and correctly rounded (even if inexact).
-For example, all integer to floating conversions are correctly rounded value preserving. +For example, all integer to floating conversions are correctly rounded value preserving.\n +如果对于 `S->T` 和 `T->S` 都有相同的父类型,则表明父类型可以表示子类型的所 有值。 +因此,如果转换 `X->Y` 不是子范围的,而相反的 `(Y->X)` 是子范围的,则父类型 总是 `Y`,我们称方向 `X->Y` 是 [*保留适当舍入值的], +意思是所有此种转换都保证产生一个在范围之内的结果且适当舍入(虽然可能不精确 )。例如,所有整数到浮点数的转换都是保留适当舍入值的。

 [endsect]

=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/bounds___traits_class.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/bounds___traits_class.html Mon Mar 22 20:44:11 2010
@@ -1,40 +1,44 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-<title>bounds&lt;&gt; traits class</title><link rel="stylesheet" href="../boostbook.css" type="text/css">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>bounds&lt;&gt; traits class</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="prev" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support"> -<link rel="next" href="conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class"></head> -<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
-<table cellpadding="2" width="100%"><tbody><tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;"> +<link rel="next" href="conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="type_requirements_and_user_defined_types_support.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="conversion_traits___traits_class.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both;">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_numericconversion.bounds___traits_class"></a><a class="link" href="bounds___traits_class.html" title="bounds&lt;&gt; traits class">bounds&lt;&gt;
-    traits class &nbsp;bounds&lt;&gt; traits 类</a>
+    traits class</a>
 </h2></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.introduction">Introduction 简介</a></span></dt> +<dt><span class="section"><a href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.introduction">
+      Introduction &#31616;&#20171;</a></span></dt>
<dt><span class="section"><a href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.traits_class_bounds_n_">traits
-      class bounds&lt;N&gt; &nbsp;traits 类 bounds&lt;N&gt;</a></span></dt>
-<dt><span class="section"><a href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.examples">Examples 例子</a></span></dt>
+      class bounds&lt;N&gt;</a></span></dt>
+<dt><span class="section"><a href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.examples">
+      Examples &#20363;&#23376;</a></span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.bounds___traits_class.introduction"></a><a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.introduction" title="Introduction">Introduction 简介</a> +<a name="boost_numericconversion.bounds___traits_class.introduction"></a><a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.introduction" title="Introduction &#31616;&#20171;">
+      Introduction &#31616;&#20171;</a>
 </h3></div></div></div>
 <p>
To determine the ranges of numeric types with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>
@@ -42,22 +46,24 @@
<code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">min</span><span class="special">()</span></code> for integral types returns the minimum finite value, whereas for floating point types it returns the minimum positive normalized value. The difference in - semantics makes client code unnecessarily complex and error prone.<br>用 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code> - [18.2.1] 来判断数字类型的范围时,必须根据数字类型使用不同的语法。特 别地,对于整型类型,<code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">min</span><span class="special">()</span></code> 返回最小限值,而对于浮点类型则返回正的最小 正规值。这种语义上的差异使得用户代码变得复杂和易错。 + semantics makes client code unnecessarily complex and error prone.<br> + &#29992; <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code> [18.2.1] &#26469;&#21028;&#26029;&#25968;&#23383;&#31867;&#22411;&#30340;&#33539;&#22260;&#26102;&#65292;&#24517;&#39035;&#26681;&#25454;&#25968;&#23383;&#31867;&#22411;&#20351;&#29992;&#19981;&#21516;&#30340;&#35821;&#27861;&#12290; + &#29305;&#21035;&#22320;&#65292;&#23545;&#20110;&#25972;&#22411;&#31867;&#22411;&#65292;<code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">min</span><span class="special">()</span></code> &#36820;&#22238;&#26368;&#23567;&#38480;&#20540;&#65292;&#32780;&#23545;&#20110;&#28014;&#28857;&#31867;&#22411;&#21017;&#36820;&#22238;&#27491;&#30340;&#26368;&#23567;&#27491;&#35268;&#20540;&#12290; + &#36825;&#31181;&#35821;&#20041;&#19978;&#30340;&#24046;&#24322;&#20351;&#24471;&#29992;&#25143;&#20195;&#30721;&#21464;&#24471;&#22797;&#26434;&#21644;&#26131;&#38169;&#12290;
       </p>
 <p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> provides a consistent interface for retrieving the maximum finite value, the minimum finite value and the minimum positive normalized value (0 for integral types) for numeric types. The selection of implementation is performed - at compile time, so there is no runtime overhead.<br><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> - 提供了一致的接口来获得数字类型的最大限值、最小限值和正的最小正规值 (对于整型类型为0)。具体实现的选择是在编译期执行,所以没有运行期的开销。 + at compile time, so there is no runtime overhead.<br> <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> &#25552;&#20379;&#20102;&#19968;&#33268;&#30340;&#25509;&#21475;&#26469;&#33719;&#24471;&#25968;&#23383;&#31867;&#22411;&#30340;&#26368;&#22823;&#38480;&#20540;&#12289;&#26368;&#23567;&#38480;&#20540;&#21644;&#27491;&#30340;&#26368;&#23567;&#27491;&#35268;&#20540;(&#23545;&#20110;&#25972;&#22411;&#31867;&#22411;&#20026;0)&#12290; + &#20855;&#20307;&#23454;&#29616;&#30340;&#36873;&#25321;&#26159;&#22312;&#32534;&#35793;&#26399;&#25191;&#34892;&#65292;&#25152;&#20197;&#27809;&#26377;&#36816;&#34892;&#26399;&#30340;&#24320;&#38144;&#12290;
       </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
<a name="boost_numericconversion.bounds___traits_class.traits_class_bounds_n_"></a><a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.traits_class_bounds_n_" title="traits class bounds&lt;N&gt;">traits
-      class bounds&lt;N&gt; &nbsp;traits 类 bounds&lt;N&gt;</a>
+      class bounds&lt;N&gt;</a>
 </h3></div></div></div>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">N</span><span class="special">&gt;</span>
 <span class="keyword">struct</span> <span class="identifier">bounds</span>
@@ -67,9 +73,10 @@
<span class="keyword">static</span> <span class="identifier">N</span> <span class="identifier">smallest</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">implementation_defined</span><span class="special">;</span> <span class="special">}</span>
 <span class="special">};</span>
 </pre>
-<a name="boost_numericconversion.bounds___traits_class.traits_class_bounds_n_.members"></a><h5>
-<a name="id2646559"></a>
- <a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.traits_class_bounds_n_.members">Members 成员</a> +<a name="boost_numericconversion.bounds___traits_class.traits_class_bounds_n_.members_______"></a><h5>
+<a name="id4876332"></a>
+ <a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.traits_class_bounds_n_.members_______">Members
+        &#25104;&#21592;</a>
       </h5>
 <div class="blockquote"><blockquote class="blockquote">
 <p>
@@ -84,9 +91,11 @@
Returns the minimum finite value, equivalent to <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">min</span><span class="special">()</span></code> when <code class="computeroutput"><span class="identifier">T</span></code> is an integral type, and to <code class="computeroutput"><span class="special">-</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code> when - <code class="computeroutput"><span class="identifier">T</span></code> is a floating point type.<br>返回最小限 值,如果 - <code class="computeroutput"><span class="identifier">T</span></code> 是一个整型类型则等同于 <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">min</span><span class="special">()</span></code>,如果 - <code class="computeroutput"><span class="identifier">T</span></code> 是一个浮点类型则等同于 <code class="computeroutput"><span class="special">-</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code>。 + <code class="computeroutput"><span class="identifier">T</span></code> is a floating point type.<br> + &#36820;&#22238;&#26368;&#23567;&#38480;&#20540;&#65292;&#22914;&#26524; <code class="computeroutput"><span class="identifier">T</span></code> + &#26159;&#19968;&#20010;&#25972;&#22411;&#31867;&#22411;&#21017;&#31561;&#21516;&#20110; <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">min</span><span class="special">()</span></code>&#65292;&#22914;&#26524; + <code class="computeroutput"><span class="identifier">T</span></code> &#26159;&#19968;&#20010;&#28014;&#28857;&#31867;&#22411;&#21017;&#31561;&#21516;&#20110; + <code class="computeroutput"><span class="special">-</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code>&#12290;
       </p>
 <div class="blockquote"><blockquote class="blockquote">
 <p>
@@ -98,7 +107,8 @@
         </p>
 </blockquote></div>
 <p>
- Returns the maximum finite value, equivalent to <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code>.<br>返回最大限值,等同于 <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code>. + Returns the maximum finite value, equivalent to <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code>.<br> + &#36820;&#22238;&#26368;&#22823;&#38480;&#20540;&#65292;&#31561;&#21516;&#20110; <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">()</span></code>.
       </p>
 <div class="blockquote"><blockquote class="blockquote">
 <p>
@@ -111,15 +121,19 @@
 </blockquote></div>
 <p>
Returns the smallest positive normalized value for floating point types with - denormalization, or returns 0 for integral types.<br>对于反规格化的 浮点类型,返回正的最小正规值,对于整型类型返回0。 + denormalization, or returns 0 for integral types.<br> &#23545;&#20110;&#21453;&#35268;&#26684;&#21270;&#30340;&#28014;&#28857;&#31867;&#22411;&#65292;&#36820;&#22238;&#27491;&#30340;&#26368;&#23567;&#27491;&#35268;&#20540;&#65292;&#23545;&#20110;&#25972;&#22411;&#31867;&#22411;&#36820;&#22238;0&#12290;
       </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.bounds___traits_class.examples"></a><a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.examples" title="Examples">Examples 例子</a> +<a name="boost_numericconversion.bounds___traits_class.examples"></a><a class="link" href="bounds___traits_class.html#boost_numericconversion.bounds___traits_class.examples" title="Examples &#20363;&#23376;">
+      Examples &#20363;&#23376;</a>
 </h3></div></div></div>
 <p>
- The following example demonstrates the use of <code class="computeroutput"><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> and the equivalent code using <code class="computeroutput"><span class="identifier">numeric_limits</span></code>:<br>以下例子示范了 <code class="computeroutput"><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> 的使用,以及使用 <code class="computeroutput"><span class="identifier">numeric_limits</span></code> 的等效代码: + The following example demonstrates the use of <code class="computeroutput"><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> and the equivalent code using <code class="computeroutput"><span class="identifier">numeric_limits</span></code>:<br> &#20197;&#19979;&#20363;&#23376;&#31034;&#33539;&#20102; + <code class="computeroutput"><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;&gt;</span></code> + &#30340;&#20351;&#29992;&#65292;&#20197;&#21450;&#20351;&#29992; <code class="computeroutput"><span class="identifier">numeric_limits</span></code>
+        &#30340;&#31561;&#25928;&#20195;&#30721;&#65306;
       </p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>

@@ -147,16 +161,17 @@
 </pre>
 </div>
 </div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tbody><tr> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2004 -2007 Fernando Luis Cacciola Carballal<p> +<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>)
       </p>
 </div></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="type_requirements_and_user_defined_types_support.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="conversion_traits___traits_class.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/conversion_traits___traits_class.html Tue Nov 25 06:14:27 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/conversion_traits___traits_class.html Mon Mar 22 20:44:11 2010
@@ -1,63 +1,65 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-<title>conversion_traits&lt;&gt; traits class</title><link rel="stylesheet" href="../boostbook.css" type="text/css">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>conversion_traits&lt;&gt; traits class</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> <link rel="prev" href="bounds___traits_class.html" title="bounds&lt;&gt; traits class"> -<link rel="next" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes"></head> -<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
-<table cellpadding="2" width="100%"><tbody><tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="next" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="bounds___traits_class.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="numeric_converter_policy_classes.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both;">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_numericconversion.conversion_traits___traits_class"></a><a class="link" href="conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class">conversion_traits&lt;&gt;
-    traits class &nbsp;conversion_traits&lt;&gt; traits 类</a>
+    traits class</a>
 </h2></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types">Types 类型</a></span></dt> -<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.examples">Examples 例子</a></span></dt> +<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types">
+      Types &#31867;&#22411;</a></span></dt>
+<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.examples">
+      Examples &#20363;&#23376;</a></span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.conversion_traits___traits_class.types"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types" title="Types">Types 类型</a> +<a name="boost_numericconversion.conversion_traits___traits_class.types"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types" title="Types &#31867;&#22411;">
+      Types &#31867;&#22411;</a>
 </h3></div></div></div>
 <div class="toc"><dl>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum">enumeration - int_float_mixture_enum 枚举类型 int_float_mixture_enum</a></span></dt>
+        int_float_mixture_enum</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum">enumeration
-        sign_mixture_enum 枚举类型 sign_mixture_enum</a></span></dt>
+        sign_mixture_enum</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum">enumeration - udt_builtin_mixture_enum 枚举类型 udt_builtin_mixture_enum</a></span></dt>
+        udt_builtin_mixture_enum</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__">template - class int_float_mixture&lt;&gt; 模板类 int_float_mixture&lt;&gt;</a></span></dt>
+        class int_float_mixture&lt;&gt;</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__">template - class sign_mixture&lt;&gt; 模板类 sign_mixture&lt;&gt;</a></span></dt>
+        class sign_mixture&lt;&gt;</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__">template - class udt_builtin_mixture&lt;&gt; 模板类 udt_builtin_mixture&lt;&gt;</a></span></dt>
+        class udt_builtin_mixture&lt;&gt;</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__">template - class is_subranged&lt;&gt; 模板类 is_subranged&lt;&gt;</a></span></dt>
+        class is_subranged&lt;&gt;</a></span></dt>
<dt><span class="section"><a href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_conversion_traits__">template - class conversion_traits&lt;&gt; 模板类 conversion_traits&lt;&gt;</a></span></dt>
+        class conversion_traits&lt;&gt;</a></span></dt>
 </dl></div>
-<a name="numeric_conversion_traits_int_float_mixture_enum"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum" title="enumeration int_float_mixture_enum">enumeration
-        int_float_mixture_enum 枚举类型 int_float_mixture_enum</a>
+        int_float_mixture_enum</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -69,14 +71,13 @@
<span class="special">,</span><span class="identifier">float_to_float</span>
     <span class="special">}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 </div>
-<a name="numeric_conversion_traits_sign_mixture_enum"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum" title="enumeration sign_mixture_enum">enumeration
-        sign_mixture_enum 枚举类型 sign_mixture_enum</a>
+        sign_mixture_enum</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -88,14 +89,13 @@
<span class="special">,</span><span class="identifier">unsigned_to_signed</span>
 <span class="special">}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 </div>
-<a name="numeric_conversion_traits_udt_builtin_mixture_enum"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum" title="enumeration udt_builtin_mixture_enum">enumeration
-        udt_builtin_mixture_enum 枚举类型 udt_builtin_mixture_enum</a>
+        udt_builtin_mixture_enum</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -107,116 +107,124 @@
<span class="special">,</span><span class="identifier">udt_to_udt</span>
     <span class="special">}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 </div>
-<a name="numeric_conversion_traits_class_int_float_mixture"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__" title="template class int_float_mixture&lt;&gt;">template - class int_float_mixture&lt;&gt; 模板类 int_float_mixture&lt;&gt;</a>
+        class int_float_mixture&lt;&gt;</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">S</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">int_float_mixture</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;</span><span class="identifier">int_float_mixture_enum</span><span class="special">,</span> <span class="identifier">impl</span><span class="special">-</span><span class="identifier">def</span><span class="special">-</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 <p>
Classifying <code class="computeroutput"><span class="identifier">S</span></code> and <code class="computeroutput"><span class="identifier">T</span></code> as either integral or float, this - <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's Integral - Constant</a> indicates the combination of these attributes.<br>将 <code class="computeroutput"><span class="identifier">S</span></code> 和 <code class="computeroutput"><span class="identifier">T</span></code> 分类为整型的或浮点的,这个 - <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL 整型常量</a> 表示了这些属性的组合。</p><p> + <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's + Integral Constant</a> indicates the combination of these attributes.<br> + &#23558; <code class="computeroutput"><span class="identifier">S</span></code> &#21644; <code class="computeroutput"><span class="identifier">T</span></code> &#20998;&#31867;&#20026;&#25972;&#22411;&#30340;&#25110;&#28014;&#28857;&#30340;&#65292;&#36825;&#20010; + <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's + Integral Constant</a> &#34920;&#31034;&#20102;&#36825;&#20123;&#23646;&#24615;&#30340;&#32452;&#21512;&#12290;
+        </p>
+<p>
Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - is of enumeration type <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_int_float_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">int_float_mixture_enum</span></code></a><br>Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - 为枚举类型 <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_int_float_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">int_float_mixture_enum</span></code></a> + is of enumeration type <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum" title="enumeration int_float_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">int_float_mixture_enum</span></code></a><br> &#20854; + <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> + &#20026;&#26522;&#20030;&#31867;&#22411; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_int_float_mixture_enum" title="enumeration int_float_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">int_float_mixture_enum</span></code></a>
         </p>
 </div>
-<a name="numeric_conversion_traits_class_sign_mixture"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__" title="template class sign_mixture&lt;&gt;">template
-        class sign_mixture&lt;&gt; 模板类 sign_mixture&lt;&gt;</a>
+        class sign_mixture&lt;&gt;</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">S</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">sign_mixture</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;</span><span class="identifier">sign_mixture_enum</span><span class="special">,</span> <span class="identifier">impl</span><span class="special">-</span><span class="identifier">def</span><span class="special">-</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 <p>
Classifying <code class="computeroutput"><span class="identifier">S</span></code> and <code class="computeroutput"><span class="identifier">T</span></code> as either signed or unsigned, this - <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's Integral - Constant</a> indicates the combination of these attributes.<br>将 <code class="computeroutput"><span class="identifier">S</span></code> 和 <code class="computeroutput"><span class="identifier">T</span></code> 分类为有符号的或无符号的,这个 - <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL 整型常量</a> 表示了这些属性的组合。 + <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's + Integral Constant</a> indicates the combination of these attributes.<br> + &#23558; <code class="computeroutput"><span class="identifier">S</span></code> &#21644; <code class="computeroutput"><span class="identifier">T</span></code> &#20998;&#31867;&#20026;&#26377;&#31526;&#21495;&#30340;&#25110;&#26080;&#31526;&#21495;&#30340;&#65292;&#36825;&#20010; + <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's + Integral Constant</a> &#34920;&#31034;&#20102;&#36825;&#20123;&#23646;&#24615;&#30340;&#32452;&#21512;&#12290;
         </p>
 <p>
Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - is of enumeration type <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_sign_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">sign_mixture_enum</span></code></a><a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_int_float_mixture_enum"><code class="computeroutput"><span class="identifier"></span></code></a><br>Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - 为枚举类型 <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_sign_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">sign_mixture_enum</span></code></a> + is of enumeration type <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum" title="enumeration sign_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">sign_mixture_enum</span></code></a><br> &#20854; <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> + &#20026;&#26522;&#20030;&#31867;&#22411; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_sign_mixture_enum" title="enumeration sign_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">sign_mixture_enum</span></code></a>
         </p>
 </div>
-<a name="numeric_conversion_traits_class_udt_builtin_mixture"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__" title="template class udt_builtin_mixture&lt;&gt;">template - class udt_builtin_mixture&lt;&gt; 模板类 udt_builtin_mixture&lt;&gt;</a>
+        class udt_builtin_mixture&lt;&gt;</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">S</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">udt_builtin_mixture</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;</span><span class="identifier">udt_builtin__mixture_enum</span><span class="special">,</span> <span class="identifier">impl</span><span class="special">-</span><span class="identifier">def</span><span class="special">-</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 <p>
Classifying <code class="computeroutput"><span class="identifier">S</span></code> and <code class="computeroutput"><span class="identifier">T</span></code> as either user-defined or builtin, this <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's - Integral Constant</a> indicates the combination of these attributes.<br>将 <code class="computeroutput"><span class="identifier">S</span></code> 和 <code class="computeroutput"><span class="identifier">T</span></code> 分类为用户自定义的或内建的,这个 - <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL 整型常量</a> 表示了这些属性的组合。 + Integral Constant</a> indicates the combination of these attributes.<br> + &#23558; <code class="computeroutput"><span class="identifier">S</span></code> &#21644; <code class="computeroutput"><span class="identifier">T</span></code> &#20998;&#31867;&#20026;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#25110;&#20869;&#24314;&#30340;&#65292;&#36825;&#20010; + <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's + Integral Constant</a> &#34920;&#31034;&#20102;&#36825;&#20123;&#23646;&#24615;&#30340;&#32452;&#21512;&#12290;
         </p>
 <p>
Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - is of enumeration type <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_udt_builtin_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">udt_builtin_mixture_enum</span></code></a><a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_sign_mixture_enum"><code class="computeroutput"><span class="identifier"></span></code></a><a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_int_float_mixture_enum"><code class="computeroutput"><span class="identifier"></span></code></a><br>Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - 为枚举类型 <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_udt_builtin_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">udt_builtin_mixture_enum</span></code></a> + is of enumeration type <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum" title="enumeration udt_builtin_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">udt_builtin_mixture_enum</span></code></a><br> + &#20854; <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> + &#20026;&#26522;&#20030;&#31867;&#22411; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.enumeration_udt_builtin_mixture_enum" title="enumeration udt_builtin_mixture_enum"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">udt_builtin_mixture_enum</span></code></a>
         </p>
 </div>
-<a name="numeric_conversion_traits_is_subranged"></a><p>
-      </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__" title="template class is_subranged&lt;&gt;">template
-        class is_subranged&lt;&gt; 模板类 is_subranged&lt;&gt;</a>
+        class is_subranged&lt;&gt;</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">S</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_subranged</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bool_</span><span class="special">&lt;</span><span class="identifier">impl</span><span class="special">-</span><span class="identifier">def</span><span class="special">-</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="special">{}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace boost::numeric
+</span></pre>
 <p>
Indicates if the range of the target type <code class="computeroutput"><span class="identifier">T</span></code> is a subset of the range of the source type <code class="computeroutput"><span class="identifier">S</span></code>. That is: if there are some source values which fall out of the Target type's - range.<br>指明目标类型 <code class="computeroutput"><span class="identifier">T</span></code> - 的范围是否为源类型 <code class="computeroutput"><span class="identifier">S</span></code> 的范围的子集。即:是否有一些源类型的值在 目标类型范围以外。 + range.<br> &#25351;&#26126;&#30446;&#26631;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> + &#30340;&#33539;&#22260;&#26159;&#21542;&#20026;&#28304;&#31867;&#22411; <code class="computeroutput"><span class="identifier">S</span></code> + &#30340;&#33539;&#22260;&#30340;&#23376;&#38598;&#12290;&#21363;&#65306;&#26159;&#21542;&#26377;&#19968;&#20123;&#28304;&#31867;&#22411;&#30340;&#20540;&#22312;&#30446;&#26631;&#31867;&#22411;&#33539;&#22260;&#20197;&#22806;&#12290;
         </p>
 <p>
It is a boolean <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's - Integral Constant</a> .<br>它是一个布尔 <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL
-          整型常量</a>。
+ Integral Constant</a> .<br> &#23427;&#26159;&#19968;&#20010;&#24067;&#23572; <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's
+          Integral Constant</a> &#12290;
         </p>
 <p>
It does not indicate if a particular conversion is effectively out of range; it indicates that some conversion might be out of range because not all - the source values are representable as Target type.<br>它并不能指 明某个特定的转换是否超出范围;它只是指明有些转换可能会超出范围,因为不是所有 源类型的值都可以表示为目标类型。 + the source values are representable as Target type.<br> &#23427;&#24182;&#19981;&#33021;&#25351;&#26126;&#26576;&#20010;&#29305;&#23450;&#30340;&#36716;&#25442;&#26159;&#21542;&#36229;&#20986;&#33539;&#22260;&#65307;&#23427;&#21482;&#26159;&#25351;&#26126;&#26377;&#20123;&#36716;&#25442;&#21487;&#33021;&#20250;&#36229;&#20986;&#33539;&#22260;&#65292;&#22240;&#20026;&#19981;&#26159;&#25152;&#26377;&#28304;&#31867;&#22411;&#30340;&#20540;&#37117;&#21487;&#20197;&#34920;&#31034;&#20026;&#30446;&#26631;&#31867;&#22411;&#12290;
         </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
<a name="boost_numericconversion.conversion_traits___traits_class.types.template_class_conversion_traits__"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_conversion_traits__" title="template class conversion_traits&lt;&gt;">template - class conversion_traits&lt;&gt; 模板类 conversion_traits&lt;&gt;</a>
+        class conversion_traits&lt;&gt;</a>
 </h4></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -238,26 +246,32 @@
<span class="keyword">typedef</span> <span class="special">...</span> <span class="identifier">subtype</span> <span class="special">;</span>
     <span class="special">}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace numeric, namespace boost<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace numeric, namespace boost
+</span></pre>
 <p>
This traits class indicates some properties of a <span class="emphasis"><em>numeric conversion</em></span> direction: from a source type <code class="computeroutput"><span class="identifier">S</span></code> to a target type <code class="computeroutput"><span class="identifier">T</span></code>. It does not indicate the properties of a <span class="emphasis"><em>specific</em></span> conversion, - but of the conversion direction. See <a class="link" href="definitions.html#numeric_conversion_definitions_subranged">Definitions</a> - for details.<br>这个 traits 类表示一个 <span class="emphasis"><em>数字转换</em></span> - 方向:从源类型 <code class="computeroutput"><span class="identifier">S</span></code> - 到目标类型 <code class="computeroutput"><span class="identifier">T</span></code> 的一些属性。它不表示某个<span class="emphasis"><em>特定</em></span>转换的属性,而是表示转换方向的属性。详 情请见 <a class="link" href="definitions.html#numeric_conversion_definitions_subranged">定义</a>。 &nbsp; + but of the conversion direction. See <a class="link" href="definitions.html#boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype" title="Subranged Conversion Direction, Subtype and Supertype &#23376;&#33539;&#22260;&#36716;&#25442;&#26041;&#21521;&#12289;&#23376;&#31867;&#22411;&#21644;&#29238;&#31867;&#22411;">Definitions</a> + for details.<br> &#36825;&#20010; traits &#31867;&#34920;&#31034;&#19968;&#20010; <span class="emphasis"><em>&#25968;&#23383;&#36716;&#25442;</em></span> + &#26041;&#21521;&#65306;&#20174;&#28304;&#31867;&#22411; <code class="computeroutput"><span class="identifier">S</span></code> + &#21040;&#30446;&#26631;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#30340;&#19968;&#20123;&#23646;&#24615;&#12290; + &#23427;&#19981;&#34920;&#31034;&#26576;&#20010;<span class="emphasis"><em>&#29305;&#23450;</em></span>&#36716;&#25442;&#30340;&#23646;&#24615;&#65292;&#32780;&#26159;&#34920;&#31034;&#36716;&#25442;&#26041;&#21521;&#30340;&#23646;&#24615;&#12290;&#35814;&#24773;&#35831;&#35265; + <a class="link" href="definitions.html#boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype" title="Subranged Conversion Direction, Subtype and Supertype &#23376;&#33539;&#22260;&#36716;&#25442;&#26041;&#21521;&#12289;&#23376;&#31867;&#22411;&#21644;&#29238;&#31867;&#22411;">&#23450;&#20041;</a>&#12290;
         </p>
 <p>
The traits class provides the following <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's Integral Constant</a> \s of enumeration type. They express the combination of certain attributes of the Source and Target types (thus they are call - mixture):<br>这个 traits 类提供以下枚举类型的 <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL - 整型常量</a>。它们表示了源类型和目标类型的特定属性的组合(因此称为 混合的): + mixture):<br> &#36825;&#20010; traits &#31867;&#25552;&#20379;&#20197;&#19979;&#26522;&#20030;&#31867;&#22411;&#30340; <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's + Integral Constant</a> &#12290;&#23427;&#20204;&#34920;&#31034;&#20102;&#28304;&#31867;&#22411;&#21644;&#30446;&#26631;&#31867;&#22411;&#30340;&#29305;&#23450;&#23646;&#24615;&#30340;&#32452;&#21512;(&#22240;&#27492;&#31216;&#20026;&#28151;&#21512;&#30340;)&#65306;
         </p>
 <div class="informaltable"><table class="table">
-<colgroup><col><col></colgroup>
+<colgroup>
+<col>
+<col>
+</colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -277,7 +291,9 @@
                 </td>
 <td>
                 <p>
- Same as given by the traits class <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_int_float_mixture">int_float_mixture</a><br>与 traits 类 <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_int_float_mixture">int_float_mixture</a> 所给出的相同<a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_int_float_mixture"></a> + Same as given by the traits class <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__" title="template class int_float_mixture&lt;&gt;">int_float_mixture</a><br> + &#19982; traits &#31867; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_int_float_mixture__" title="template class int_float_mixture&lt;&gt;">int_float_mixture</a>
+                  &#25152;&#32473;&#20986;&#30340;&#30456;&#21516;
                 </p>
                 </td>
 </tr>
@@ -289,7 +305,9 @@
                 </td>
 <td>
                 <p>
- Same as given by the traits class <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_sign_mixture">sign_mixture</a><br>与 traits 类<a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_int_float_mixture"></a> <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_sign_mixture">sign_mixture</a>&nbsp;所 给出的相同 + Same as given by the traits class <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__" title="template class sign_mixture&lt;&gt;">sign_mixture</a><br> + &#19982; traits &#31867; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_sign_mixture__" title="template class sign_mixture&lt;&gt;">sign_mixture</a>
+                  &#25152;&#32473;&#20986;&#30340;&#30456;&#21516;
                 </p>
                 </td>
 </tr>
@@ -301,7 +319,9 @@
                 </td>
 <td>
                 <p>
- Same as given by the traits class <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_udt_builtin_mixture">udt_builtin_mixture</a><br>与 traits 类 <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_udt_builtin_mixture">udt_builtin_mixture</a><a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_class_sign_mixture"></a>&nbsp;所 给出的相同 + Same as given by the traits class <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__" title="template class udt_builtin_mixture&lt;&gt;">udt_builtin_mixture</a><br> + &#19982; traits &#31867; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_udt_builtin_mixture__" title="template class udt_builtin_mixture&lt;&gt;">udt_builtin_mixture</a>
+                  &#25152;&#32473;&#20986;&#30340;&#30456;&#21516;
                 </p>
                 </td>
 </tr>
@@ -310,11 +330,16 @@
 <p>
The traits class provides the following <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's Integral Constant</a> \s of boolean type which indicates indirectly - the relation between the Source and Target ranges (see <a class="link" href="definitions.html#numeric_conversion_definitions_range">Definitions</a> - for details).<br>这个 traits 类提供以下布尔类型的 <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL 整型常量</a>,间接地表示源类型范围和目标类型范围间的关系 (详见 <a class="link" href="definitions.html#numeric_conversion_definitions_range">定义</a>)。 + the relation between the Source and Target ranges (see <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">Definitions</a> + for details).<br> &#36825;&#20010; traits &#31867;&#25552;&#20379;&#20197;&#19979;&#24067;&#23572;&#31867;&#22411;&#30340; <a href="../../../../../mpl/doc/refmanual/integral-constant.html" target="_top">MPL's Integral + Constant</a> &#65292;&#38388;&#25509;&#22320;&#34920;&#31034;&#28304;&#31867;&#22411;&#33539;&#22260;&#21644;&#30446;&#26631;&#31867;&#22411;&#33539;&#22260;&#38388;&#30340;&#20851;&#31995;(&#35814;&#35265; + <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">&#23450;&#20041;</a>)&#12290;
         </p>
 <div class="informaltable"><table class="table">
-<colgroup><col><col></colgroup>
+<colgroup>
+<col>
+<col>
+</colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -334,7 +359,9 @@
                 </td>
 <td>
                 <p>
- Same as given by <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_is_subranged">is_subranged</a><br>与 <a class="link" href="conversion_traits___traits_class.html#numeric_conversion_traits_is_subranged">is_subranged</a> 所给出的相同 + Same as given by <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__" title="template class is_subranged&lt;&gt;">is_subranged</a><br> + &#19982; <a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types.template_class_is_subranged__" title="template class is_subranged&lt;&gt;">is_subranged</a>
+                  &#25152;&#32473;&#20986;&#30340;&#30456;&#21516;
                 </p>
                 </td>
 </tr>
@@ -347,12 +374,13 @@
 <td>
                 <p>
Indicates if both Source and Target, <span class="underline">without - cv-qualifications</span>, are the same type.</p><p>表明源 类型和目标类型 <span class="underline">在不考虑cv-限定符下</span> 是否为相同 类型。 + cv-qualifications</span>, are the same type.<br> &#34920;&#26126;&#28304;&#31867;&#22411;&#21644;&#30446;&#26631;&#31867;&#22411; + <span class="underline">&#22312;&#19981;&#32771;&#34385;cv-&#38480;&#23450;&#31526;&#19979;</span> + &#26159;&#21542;&#20026;&#30456;&#21516;&#31867;&#22411;&#12290;
                 </p>
                 <p>
Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code> - is of boolean type.<br>Its <code class="computeroutput"><span class="special">::</span><span class="identifier">value</span></code>
-                  为布尔类型。
+ is of boolean type.<br> &#20854; ::value &#20026;&#24067;&#23572;&#31867;&#22411;&#12290;
                 </p>
                 </td>
 </tr>
@@ -360,10 +388,14 @@
 </table></div>
 <p>
The traits class provides the following types. They are the Source and - Target types classified and qualified for different purposes.<br>这个 traits 类提供以下类型。它们根据不同目的对源类型和目标类型 进行分类和限定。 + Target types classified and qualified for different purposes.<br> &#36825;&#20010; + traits &#31867;&#25552;&#20379;&#20197;&#19979;&#31867;&#22411;&#12290;&#23427;&#20204;&#26681;&#25454;&#19981;&#21516;&#30446;&#30340;&#23545;&#28304;&#31867;&#22411;&#21644;&#30446;&#26631;&#31867;&#22411;&#36827;&#34892;&#20998;&#31867;&#21644;&#38480;&#23450;&#12290;
         </p>
 <div class="informaltable"><table class="table">
-<colgroup><col><col></colgroup>
+<colgroup>
+<col>
+<col>
+</colgroup>
 <thead><tr>
 <th>
                 <p>
@@ -384,7 +416,8 @@
 <td>
                 <p>
The template parameter <code class="computeroutput"><span class="identifier">T</span></code> - without cv-qualifications</p><p>不带cv-限定符的模板参数 <code class="computeroutput"><span class="identifier">T</span></code> + without cv-qualifications<br> &#19981;&#24102;cv-&#38480;&#23450;&#31526;&#30340;&#27169;&#26495;&#21442;&#25968; + <code class="computeroutput"><span class="identifier">T</span></code>
                 </p>
                 </td>
 </tr>
@@ -397,7 +430,9 @@
 <td>
                 <p>
The template parameter <code class="computeroutput"><span class="identifier">S</span></code> - without cv-qualifications</p><p>不带cv-限定符的模板参数 &nbsp;<code class="computeroutput"><span class="identifier">S</span></code></p> + without cv-qualifications<br> &#19981;&#24102;cv-&#38480;&#23450;&#31526;&#30340;&#27169;&#26495;&#21442;&#25968; + <code class="computeroutput"><span class="identifier">S</span></code>
+                </p>
                 </td>
 </tr>
 <tr>
@@ -409,18 +444,22 @@
 <td>
                 <p>
This type is either source_type or <code class="computeroutput"><span class="identifier">source_type</span> - <span class="keyword">const</span><span class="special">&amp;</span></code>.</p><p>该类型为 source_type 或 <code class="computeroutput"><span class="identifier">source_type</span> - <span class="keyword">const</span><span class="special">&amp;</span></code>。 + <span class="keyword">const</span><span class="special">&amp;</span></code>.<br> + &#35813;&#31867;&#22411;&#20026; <code class="computeroutput"><span class="identifier">source_type</span></code> + &#25110; <code class="computeroutput"><span class="identifier">source_type</span> <span class="keyword">const</span><span class="special">&amp;</span></code>&#12290;
                 </p>
                 <p>
- It represents the optimal argument type for the <a class="link" href="../index.html#numeric_conversion_converter">converter</a> - member functions.<br>它表示了用于 <a class="link" href="../index.html#numeric_conversion_converter">converter</a> 成员函数的优 化参数类型。 + It represents the optimal argument type for the <a class="link" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">converter</a> + member functions.<br> &#23427;&#34920;&#31034;&#20102;&#29992;&#20110; <a class="link" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">converter</a> + &#25104;&#21592;&#20989;&#25968;&#30340;&#20248;&#21270;&#21442;&#25968;&#31867;&#22411;&#12290;
                 </p>
                 <p>
If S is a built-in type, this is <code class="computeroutput"><span class="identifier">source_type</span></code>, otherwise, this is <code class="computeroutput"><span class="identifier">source_type</span> - <span class="keyword">const</span><span class="special">&amp;</span></code>.<br>如果 S 是内建类型,则它为 <code class="computeroutput"><span class="identifier">source_type</span></code>,否则为 <code class="computeroutput"><span class="identifier">source_type</span> - <span class="keyword">const</span><span class="special">&amp;</span></code>。 + <span class="keyword">const</span><span class="special">&amp;</span></code>.<br> + &#22914;&#26524; <code class="computeroutput"><span class="identifier">S</span></code> &#26159;&#20869;&#24314;&#31867;&#22411;&#65292;&#21017;&#23427;&#20026; + <code class="computeroutput"><span class="identifier">source_type</span></code>&#65292;&#21542;&#21017;&#20026; + <code class="computeroutput"><span class="identifier">source_type</span> <span class="keyword">const</span><span class="special">&amp;</span></code>&#12290;
                 </p>
                 </td>
 </tr>
@@ -432,16 +471,22 @@
                 </td>
 <td>
                 <p>
- This type is either target_type or target_type const&amp;</p><p>该类型为target_type 或 target_type const&amp;<code class="computeroutput"><span class="special"></span></code>。</p> + This type is either target_type or target_type const&amp;<br> + &#35813;&#31867;&#22411;&#20026; <code class="computeroutput"><span class="identifier">target_type</span></code> + &#25110; <code class="computeroutput"><span class="identifier">target_type</span> <span class="keyword">const</span><span class="special">&amp;</span></code>&#12290;
+                </p>
                 <p>
- It represents the return type of the <a class="link" href="../index.html#numeric_conversion_converter">converter</a> - member functions.<br>它表示了用于 <a class="link" href="../index.html#numeric_conversion_converter">converter</a> 成员函数的返 回类型。 + It represents the return type of the <a class="link" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">converter</a> + member functions.<br> &#23427;&#34920;&#31034;&#20102;&#29992;&#20110; <a class="link" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">converter</a> + &#25104;&#21592;&#20989;&#25968;&#30340;&#36820;&#22238;&#31867;&#22411;&#12290;
                 </p>
                 <p>
If <code class="computeroutput"><span class="identifier">T</span><span class="special">==</span><span class="identifier">S</span></code>, it is <code class="computeroutput"><span class="identifier">target_type</span> <span class="keyword">const</span><span class="special">&amp;</span></code>, - otherwise, it is <code class="computeroutput"><span class="identifier">target_type</span></code>.<br>如果&nbsp;<code class="computeroutput"><span class="identifier">T</span><span class="special">==</span><span class="identifier">S</span></code>,则它为 &nbsp;<code class="computeroutput"><span class="identifier">target_type</span> - <span class="keyword">const</span><span class="special">&amp;</span></code><code class="computeroutput"><span class="identifier"></span></code>,否则为 <code class="computeroutput"><span class="identifier">target_type</span></code>。 + otherwise, it is <code class="computeroutput"><span class="identifier">target_type</span></code>.<br> + &#22914;&#26524; <code class="computeroutput"><span class="identifier">T</span><span class="special">==</span><span class="identifier">S</span></code>&#65292;&#21017;&#23427;&#20026; <code class="computeroutput"><span class="identifier">target_type</span> + <span class="keyword">const</span><span class="special">&amp;</span></code>&#65292;&#21542;&#21017;&#20026; + <code class="computeroutput"><span class="identifier">target_type</span></code>&#12290;
                 </p>
                 </td>
 </tr>
@@ -454,7 +499,9 @@
 <td>
                 <p>
If the conversion is subranged, it is <code class="computeroutput"><span class="identifier">source_type</span></code>, - otherwise, it is <code class="computeroutput"><span class="identifier">target_type</span></code><br>如果转换是子范围的,它为 &nbsp;<code class="computeroutput"><span class="identifier">source</span></code><code class="computeroutput"><span class="identifier">_type</span><span class="special"></span></code><code class="computeroutput"><span class="identifier"></span></code>,否则为 <code class="computeroutput"><span class="identifier">target_type</span></code>。 + otherwise, it is <code class="computeroutput"><span class="identifier">target_type</span></code><br> + &#22914;&#26524;&#36716;&#25442;&#26159;&#23376;&#33539;&#22260;&#30340;&#65292;&#23427;&#20026; <code class="computeroutput"><span class="identifier">source_type</span></code>&#65292;&#21542;&#21017;&#20026; + <code class="computeroutput"><span class="identifier">target_type</span></code>&#12290;
                 </p>
                 </td>
 </tr>
@@ -467,7 +514,9 @@
 <td>
                 <p>
If the conversion is subranged, it is <code class="computeroutput"><span class="identifier">target_type</span></code>, - otherwise, it is <code class="computeroutput"><span class="identifier">source_type</span></code><code class="computeroutput"><span class="identifier"></span></code><br>如果转换是 子范围的,它为&nbsp;<code class="computeroutput"><span class="identifier">target</span></code><code class="computeroutput"><span class="identifier">_type</span><span class="special"></span></code><code class="computeroutput"><span class="identifier"></span></code>,否则为 &nbsp;<code class="computeroutput"><span class="identifier">source</span></code><code class="computeroutput"><span class="identifier">_type</span></code>。 + otherwise, it is <code class="computeroutput"><span class="identifier">source_type</span></code><br> + &#22914;&#26524;&#36716;&#25442;&#26159;&#23376;&#33539;&#22260;&#30340;&#65292;&#23427;&#20026; <code class="computeroutput"><span class="identifier">target_type</span></code>&#65292;&#21542;&#21017;&#20026; + <code class="computeroutput"><span class="identifier">source_type</span></code>&#12290;
                 </p>
                 </td>
 </tr>
@@ -477,7 +526,8 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.conversion_traits___traits_class.examples"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.examples" title="Examples">Examples 例子</a> +<a name="boost_numericconversion.conversion_traits___traits_class.examples"></a><a class="link" href="conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.examples" title="Examples &#20363;&#23376;">
+      Examples &#20363;&#23376;</a>
 </h3></div></div></div>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">typeinfo</span><span class="special">&gt;</span>
@@ -486,17 +536,20 @@
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
 <span class="special">{</span>

- <span class="comment">// A trivial conversion. 简单转换<br></span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">,</span><span class="keyword">short</span><span class="special">&gt;</span> <span class="identifier">Short2Short_Traits</span> <span class="special">;</span> + <span class="comment">// A trivial conversion. &#31616;&#21333;&#36716;&#25442; +</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">,</span><span class="keyword">short</span><span class="special">&gt;</span> <span class="identifier">Short2Short_Traits</span> <span class="special">;</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="identifier">Short2Short_Traits</span><span class="special">::</span><span class="identifier">trivial</span><span class="special">::</span><span class="identifier">value</span> <span class="special">)</span> <span class="special">;</span>

- <span class="comment">// A subranged conversion. 子范围转换 <br></span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">UInt2Double_Traits</span> <span class="special">;</span> + <span class="comment">// A subranged conversion. &#23376;&#33539;&#22260;&#36716;&#25442; +</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">UInt2Double_Traits</span> <span class="special">;</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="identifier">UInt2Double_Traits</span><span class="special">::</span><span class="identifier">int_float_mixture</span><span class="special">::</span><span class="identifier">value</span> <span class="special">==</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">integral_to_float</span> <span class="special">)</span> <span class="special">;</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="identifier">UInt2Double_Traits</span><span class="special">::</span><span class="identifier">sign_mixture</span><span class="special">::</span><span class="identifier">value</span> <span class="special">==</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">unsigned_to_signed</span> <span class="special">)</span> <span class="special">;</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="special">!</span><span class="identifier">UInt2Double_Traits</span><span class="special">::</span><span class="identifier">subranged</span><span class="special">::</span><span class="identifier">value</span> <span class="special">)</span> <span class="special">;</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="keyword">typeid</span><span class="special">(</span><span class="identifier">UInt2Double_Traits</span><span class="special">::</span><span class="identifier">supertype</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">typeid</span><span class="special">(</span><span class="keyword">double</span><span class="special">)</span> <span class="special">)</span> <span class="special">;</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="keyword">typeid</span><span class="special">(</span><span class="identifier">UInt2Double_Traits</span><span class="special">::</span><span class="identifier">subtype</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">typeid</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">)</span> <span class="special">)</span> <span class="special">;</span>

- <span class="comment">// A doubly subranged conversion. 双重子范围转换 <br></span> <span class="identifier">assert</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">&gt;::</span><span class="identifier">subranged</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span> <span class="special">);</span> + <span class="comment">// A doubly subranged conversion. &#21452;&#23376;&#33539;&#22260;&#36716;&#25442; +</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">&gt;::</span><span class="identifier">subranged</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span> <span class="special">);</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">short</span><span class="special">,</span> <span class="keyword">short</span><span class="special">&gt;::</span><span class="identifier">subranged</span><span class="special">::</span><span class="identifier">value</span><span class="special">)</span> <span class="special">);</span>

<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
@@ -504,16 +557,17 @@
 </pre>
 </div>
 </div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tbody><tr> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2004 -2007 Fernando Luis Cacciola Carballal<p> +<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>)
       </p>
 </div></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="bounds___traits_class.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="numeric_converter_policy_classes.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/converter___function_object.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/converter___function_object.html Mon Mar 22 20:44:11 2010
@@ -1,44 +1,48 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-<title>converter&lt;&gt; function object</title><link rel="stylesheet" href="../boostbook.css" type="text/css">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion">
-<link rel="prev" href="definitions.html" title="Definitions">
-<link rel="next" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support"></head> -<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
-<table cellpadding="2" width="100%"><tbody><tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="definitions.html" title="Definitions &#23450;&#20041;"> +<link rel="next" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="definitions.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="type_requirements_and_user_defined_types_support.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both;">
-<a name="boost_numericconversion.converter___function_object"></a><a class="link" href="converter___function_object.html" title="converter&lt;&gt; function object">converter&lt;&gt;
-    function object &nbsp;converter&lt;&gt; 函数对象</a>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_numericconversion.converter___function_object"></a><a class="link" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;"> converter&lt;&gt;
+    function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;</a>
 </h2></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.synopsis">Synopsis 摘要</a></span></dt> -<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.template_parameters">Template
-      parameters 模板参数</a></span></dt>
-<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.member_functions">Member
-      functions 成员函数</a></span></dt>
-<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic">Range
-      Checking Logic 范围检查逻辑</a></span></dt>
-<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.examples">Examples 例子</a></span></dt> +<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.synopsis">
+      Synopsis &#25688;&#35201;</a></span></dt>
+<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.template_parameters">
+      Template parameters &#27169;&#26495;&#21442;&#25968;</a></span></dt>
+<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.member_functions">
+      Member functions &#25104;&#21592;&#20989;&#25968;</a></span></dt>
+<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic"> + Range Checking Logic &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;</a></span></dt> +<dt><span class="section"><a href="converter___function_object.html#boost_numericconversion.converter___function_object.examples">
+      Examples &#20363;&#23376;</a></span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.converter___function_object.synopsis"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.synopsis" title="Synopsis">Synopsis 摘要</a> +<a name="boost_numericconversion.converter___function_object.synopsis"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.synopsis" title="Synopsis &#25688;&#35201;">
+      Synopsis &#25688;&#35201;</a>
 </h3></div></div></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -63,7 +67,8 @@

<span class="identifier">result_type</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">;</span>

- <span class="comment">// Internal member functions: 内部成员函 数:<br></span> + <span class="comment">// Internal member functions: &#20869;&#37096;&#25104;&#21592;&#20989;&#25968;&#65306;
+</span>
<span class="keyword">static</span> <span class="identifier">range_check_result</span> <span class="identifier">out_of_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> <span class="special">;</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">validate_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> <span class="special">;</span> <span class="keyword">static</span> <span class="identifier">result_type</span> <span class="identifier">low_level_convert</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> <span class="special">;</span>
@@ -71,26 +76,34 @@

     <span class="special">}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace numeric, boost<br></span></pre> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace numeric, boost
+</span></pre>
 <p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> is a <a href="http://www.sgi.com/tech/stl/UnaryFunction.html"; target="_top">Unary Function Object</a> encapsulating the code to perform a numeric conversion with the direction and properties specified by the Traits template parameter. - It can optionally take some <a class="link" href="../index.html#numeric_coversion_converter_policies">policies</a> + It can optionally take some <a class="link" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;">policies</a> which can be used to customize its behavior. The <code class="computeroutput"><span class="identifier">Traits</span></code> - parameter is not a policy but the parameter that defines the conversion.<br><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> - 是一个 <a href="http://www.sgi.com/tech/stl/UnaryFunction.html"; target="_top">单参函数对象</a>,它封装了执行数字转换的代码,转换的方向和各种 属性由 Traits 模板参数指定。它可选地接受一些 <a class="link" href="../index.html#numeric_coversion_converter_policies">策略</a> 以定制其 行为。<code class="computeroutput"><span class="identifier">Traits</span></code>
-        参数并非策略,但该参数定义了该转换。
+ parameter is not a policy but the parameter that defines the conversion.<br> + <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> + &#26159;&#19968;&#20010; <a href="http://www.sgi.com/tech/stl/UnaryFunction.html"; target="_top">Unary + Function Object</a>&#65292;&#23427;&#23553;&#35013;&#20102;&#25191;&#34892;&#25968;&#23383;&#36716;&#25442;&#30340;&#20195;&#30721;&#65292;&#36716;&#25442;&#30340;&#26041;&#21521;&#21644;&#21508;&#31181;&#23646;&#24615;&#30001; + Traits &#27169;&#26495;&#21442;&#25968;&#25351;&#23450;&#12290; &#23427;&#21487;&#36873;&#22320;&#25509;&#21463;&#19968;&#20123; <a class="link" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;">&#31574;&#30053;</a> + &#20197;&#23450;&#21046;&#20854;&#34892;&#20026;&#12290; <code class="computeroutput"><span class="identifier">Traits</span></code> + &#21442;&#25968;&#24182;&#38750;&#31574;&#30053;&#65292;&#20294;&#35813;&#21442;&#25968;&#23450;&#20041;&#20102;&#35813;&#36716;&#25442;&#12290;
       </p>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.converter___function_object.template_parameters"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.template_parameters" title="Template parameters">Template
-      parameters 模板参数</a>
+<a name="boost_numericconversion.converter___function_object.template_parameters"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.template_parameters" title="Template parameters &#27169;&#26495;&#21442;&#25968;">
+      Template parameters &#27169;&#26495;&#21442;&#25968;</a>
 </h3></div></div></div>
 <div class="informaltable"><table class="table">
-<colgroup><col><col></colgroup>
+<colgroup>
+<col>
+<col>
+</colgroup>
 <thead><tr>
 <th>
               <p>
@@ -110,8 +123,9 @@
               </td>
 <td>
               <p>
- The <a class="link" href="definitions.html#numeric_conversion_definitions_numeric_types">Numeric - Type</a> which is the <span class="emphasis"><em>Target</em></span> of the conversion.</p><p>作为转换 <span class="emphasis"><em>目标t</em></span>的 <a class="link" href="definitions.html#numeric_conversion_definitions_numeric_types">数字类 型</a>。 + The <a class="link" href="definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">Numeric + Type</a> which is the <span class="emphasis"><em>Target</em></span> of the conversion.<br> + &#20316;&#20026;&#36716;&#25442; <span class="emphasis"><em>&#30446;&#26631;</em></span> &#30340; <a class="link" href="definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">&#25968;&#23383;&#31867;&#22411;</a>&#12290;
               </p>
               </td>
 </tr>
@@ -123,8 +137,9 @@
               </td>
 <td>
               <p>
- The <a class="link" href="definitions.html#numeric_conversion_definitions_numeric_types">Numeric - Type</a> which is the <span class="emphasis"><em>Source</em></span> of the conversion.</p><p>作为转换 <span class="emphasis"><em>源</em></span>的 <a class="link" href="definitions.html#numeric_conversion_definitions_numeric_types">数字类 型</a>。 + The <a class="link" href="definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">Numeric + Type</a> which is the <span class="emphasis"><em>Source</em></span> of the conversion.<br> + &#20316;&#20026;&#36716;&#25442; <span class="emphasis"><em>&#28304;</em></span> &#30340; <a class="link" href="definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">&#25968;&#23383;&#31867;&#22411;</a>&#12290;
               </p>
               </td>
 </tr>
@@ -136,7 +151,8 @@
               </td>
 <td>
               <p>
- This must be a conversion traits class with the interface of <a class="link" href="../index.html#numeric_conversion_traits"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span></code></a><br>必须是一个转换 traits 类,具有 <a class="link" href="../index.html#numeric_conversion_traits"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span></code></a> 的接口<a class="link" href="../index.html#numeric_conversion_traits"><code class="computeroutput"><span class="identifier"></span></code></a> + This must be a conversion traits class with the interface of <a class="link" href="conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span></code></a><br> + &#24517;&#39035;&#26159;&#19968;&#20010;&#36716;&#25442; traits &#31867;&#65292;&#20855;&#26377; <a class="link" href="conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">conversion_traits</span></code></a> &#30340;&#25509;&#21475;
               </p>
               </td>
 </tr>
@@ -149,12 +165,14 @@
 <td>
               <p>
<span class="bold"><strong>Stateless Policy</strong></span> called to administrate - the result of the range checking.</p><p><span class="bold"><strong>无状态策略</strong></span>,被调用以处理范围检查的结 果。 + the result of the range checking.<br> <span class="bold"><strong>&#26080;&#29366;&#24577;&#31574;&#30053;</strong></span>&#65292;&#34987;&#35843;&#29992;&#20197;&#22788;&#29702;&#33539;&#22260;&#26816;&#26597;&#30340;&#32467;&#26524;&#12290;
               </p>
               <p>
It is a <span class="bold"><strong>Function Object</strong></span> which receives the result of <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> and is called inside the <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> - static member function exposed by the converter.<br>它是一 个 <span class="bold"><strong>函数对象</strong></span>,接受 <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> 的结果,在由转换器所开放的 <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> 静态成员函数中被调用。 + static member function exposed by the converter.<br> &#23427;&#26159;&#19968;&#20010; + <span class="bold"><strong>&#20989;&#25968;&#23545;&#35937;</strong></span>&#65292;&#25509;&#21463; <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> + &#30340;&#32467;&#26524;&#65292;&#22312;&#30001;&#36716;&#25442;&#22120;&#25152;&#24320;&#25918;&#30340; <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#20013;&#34987;&#35843;&#29992;&#12290;
               </p>
               </td>
 </tr>
@@ -167,11 +185,13 @@
 <td>
               <p>
<span class="bold"><strong>Stateless Policy</strong></span> which specifies - the rounding mode used for float to integral conversions.</p><p><span class="bold"><strong>无状态策略</strong></span>,指 定用于浮点数到整数转换的舍入方式。 + the rounding mode used for float to integral conversions.<br> + <span class="bold"><strong>&#26080;&#29366;&#24577;&#31574;&#30053;</strong></span>&#65292;&#25351;&#23450;&#29992;&#20110;&#28014;&#28857;&#25968;&#21040;&#25972;&#25968;&#36716;&#25442;&#30340;&#33293;&#20837;&#26041;&#24335;&#12290;
               </p>
               <p>
It supplies the <code class="computeroutput"><span class="identifier">nearbyint</span><span class="special">()</span></code> static member function exposed - by the converter.<br>它提供由转换器开放的 <code class="computeroutput"><span class="identifier">nearbyint</span><span class="special">()</span></code> 静态成员函数。 + by the converter.<br> &#23427;&#25552;&#20379;&#30001;&#36716;&#25442;&#22120;&#24320;&#25918;&#30340; <code class="computeroutput"><span class="identifier">nearbyint</span><span class="special">()</span></code>
+                &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#12290;
               </p>
               </td>
 </tr>
@@ -184,11 +204,12 @@
 <td>
               <p>
<span class="bold"><strong>Stateless Policy</strong></span> which is used to - perform the actual conversion.</p><p><span class="bold"><strong>无状态策略</strong></span>,用于执行实际的转换。 + perform the actual conversion.<br> <span class="bold"><strong>&#26080;&#29366;&#24577;&#31574;&#30053;</strong></span>&#65292;&#29992;&#20110;&#25191;&#34892;&#23454;&#38469;&#30340;&#36716;&#25442;&#12290;
               </p>
               <p>
It supplies the <code class="computeroutput"><span class="identifier">low_level_convert</span><span class="special">()</span></code> static member function exposed - by the converter.<br>它提供由转换器开放的 <code class="computeroutput"><span class="identifier">low_level_convert</span><span class="special">()</span></code> 过静态成员函数。 + by the converter.<br> &#23427;&#25552;&#20379;&#30001;&#36716;&#25442;&#22120;&#24320;&#25918;&#30340; <code class="computeroutput"><span class="identifier">low_level_convert</span><span class="special">()</span></code> + &#36807;&#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#12290;
               </p>
               </td>
 </tr>
@@ -202,11 +223,13 @@
               <p>
<span class="emphasis"><em>Special and Optional</em></span> <span class="bold"><strong>Stateless Policy</strong></span> which can be used to override the internal range - checking logic.</p><p><span class="emphasis"><em>特定且可选 的</em></span> <span class="bold"><strong>无状态策略</strong></span>,可用于 覆盖内部的范围检查逻辑。 + checking logic.<br> <span class="emphasis"><em>&#29305;&#23450;&#19988;&#21487;&#36873;&#30340;</em></span> <span class="bold"><strong>&#26080;&#29366;&#24577;&#31574;&#30053;</strong></span>&#65292;&#21487;&#29992;&#20110;&#35206;&#30422;&#20869;&#37096;&#30340;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#12290;
               </p>
               <p>
If given, supplies alternative code for the <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> static member functions exposed - by the converter.<br>如果给出,则提供由转换器开放的 <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> 和 <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> 静态成员函数的替换代码。 + by the converter.<br> &#22914;&#26524;&#32473;&#20986;&#65292;&#21017;&#25552;&#20379;&#30001;&#36716;&#25442;&#22120;&#24320;&#25918;&#30340; + <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> + &#21644; <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#30340;&#26367;&#25442;&#20195;&#30721;&#12290;
               </p>
               </td>
 </tr>
@@ -215,8 +238,8 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.converter___function_object.member_functions"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.member_functions" title="Member functions">Member
-      functions 成员函数</a>
+<a name="boost_numericconversion.converter___function_object.member_functions"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.member_functions" title="Member functions &#25104;&#21592;&#20989;&#25968;">
+      Member functions &#25104;&#21592;&#20989;&#25968;</a>
 </h3></div></div></div>
 <div class="blockquote"><blockquote class="blockquote">
 <p>
@@ -226,35 +249,47 @@
<span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="identifier">convert</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span>
             <span class="special">)</span> <span class="special">;</span>
-            <span class="comment">// throw 有抛出 </span></code>
+ <span class="comment">// throw &#26377;&#25243;&#20986; </span></code>
           </p>
 <p>
         </p>
 </blockquote></div>
 <p>
This static member function converts an rvalue of type <code class="computeroutput"><span class="identifier">source_type</span></code> - to an rvalue of type <code class="computeroutput"><span class="identifier">target_type</span></code>.<br>该静态成员函数将一个类型为 <code class="computeroutput"><span class="identifier">source_type</span></code> - 的右值转换为一个类型为 <code class="computeroutput"><span class="identifier">target_type</span></code> 的右值。 + to an rvalue of type <code class="computeroutput"><span class="identifier">target_type</span></code>.<br> + &#35813;&#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#23558;&#19968;&#20010;&#31867;&#22411;&#20026; <code class="computeroutput"><span class="identifier">source_type</span></code> + &#30340;&#21491;&#20540;&#36716;&#25442;&#20026;&#19968;&#20010;&#31867;&#22411;&#20026; <code class="computeroutput"><span class="identifier">target_type</span></code>
+        &#30340;&#21491;&#20540;&#12290;
       </p>
-
 <p>
If the conversion requires it, it performs a range checking before the conversion and passes the result of the check to the overflow handler policy (the default - policy throws an exception if out-of-range is detected)<br>如果转换 需要,则在转换前执行一个范围检查,并将检查结果传递给溢出处理器策略(缺省的策 略是在检测到溢出时抛出一个异常)。 + policy throws an exception if out-of-range is detected)<br> &#22914;&#26524;&#36716;&#25442;&#38656;&#35201;&#65292;&#21017;&#22312;&#36716;&#25442;&#21069;&#25191;&#34892;&#19968;&#20010;&#33539;&#22260;&#26816;&#26597;&#65292;&#24182;&#23558;&#26816;&#26597;&#32467;&#26524;&#20256;&#36882;&#32473;&#28322;&#20986;&#22788;&#29702;&#22120;&#31574;&#30053;(&#32570;&#30465;&#30340;&#31574;&#30053;&#26159;&#22312;&#26816;&#27979;&#21040;&#28322;&#20986;&#26102;&#25243;&#20986;&#19968;&#20010;&#24322;&#24120;)&#12290;
       </p>
 <p>
The implementation of this function is actually built from the policies and - is basically as follows:<br>该函数的实现实际上是依据策略来建造,基 本如下: + is basically as follows:<br> &#35813;&#20989;&#25968;&#30340;&#23454;&#29616;&#23454;&#38469;&#19978;&#26159;&#20381;&#25454;&#31574;&#30053;&#26469;&#24314;&#36896;&#65292;&#22522;&#26412;&#22914;&#19979;&#65306;
       </p>
<pre class="programlisting"><span class="identifier">result_type</span> <span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="identifier">convert</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span>
 <span class="special">{</span>
- <span class="identifier">validate_range</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// Implemented by the internal range checking logic<br></span> <span class="comment">// (which also calls the OverflowHandler policy)<br></span> <span class="comment">// or externally supplied by the UserRangeChecker policy.<br> // 由内部的范围检查逻辑来实现(它也调用 OverflowHandler 策略)<br> // 或者由 UserRangeChecker 策略所提供的外部逻辑来实现<br></span> - <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">nearbyint</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// Externally supplied by the Float2IntRounder policy.<br></span> <span class="comment">// NOTE: This is actually called only for float to int conversions.<br> // 由 Float2IntRounder 策略提供的外部 逻辑<br> // 注:仅在浮点数至整数转换时实际调用 <br></span> - <span class="keyword">return</span> <span class="identifier">low_level_convert</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// Externally supplied by the RawConverter policy.<br> // 由 RawConverter 策略提供的外部逻辑<br></span><span class="special">}</span> + <span class="identifier">validate_range</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// Implemented by the internal range checking logic +</span> <span class="comment">// (which also calls the OverflowHandler policy) +</span> <span class="comment">// or externally supplied by the UserRangeChecker policy. +</span> <span class="comment">// &#30001;&#20869;&#37096;&#30340;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#26469;&#23454;&#29616;(&#23427;&#20063;&#35843;&#29992; OverflowHandler &#31574;&#30053;) +</span> <span class="comment">// &#25110;&#32773;&#30001; UserRangeChecker &#31574;&#30053;&#25152;&#25552;&#20379;&#30340;&#22806;&#37096;&#36923;&#36753;&#26469;&#23454;&#29616;
+</span>
+ <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">nearbyint</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// Externally supplied by the Float2IntRounder policy. +</span> <span class="comment">// NOTE: This is actually called only for float to int conversions. +</span> <span class="comment">// &#30001; Float2IntRounder &#31574;&#30053;&#25552;&#20379;&#30340;&#22806;&#37096;&#36923;&#36753; +</span> <span class="comment">// &#27880;&#65306;&#20165;&#22312;&#28014;&#28857;&#25968;&#33267;&#25972;&#25968;&#36716;&#25442;&#26102;&#23454;&#38469;&#35843;&#29992;
+</span>
+ <span class="keyword">return</span> <span class="identifier">low_level_convert</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span> <span class="comment">// Externally supplied by the RawConverter policy. +</span> <span class="comment">// &#30001; RawConverter &#31574;&#30053;&#25552;&#20379;&#30340;&#22806;&#37096;&#36923;&#36753;
+</span><span class="special">}</span>
 </pre>
 <p>
-        </p><p>
- <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="keyword">operator</span><span class="special">()</span> <span class="keyword">const</span></code> just calls <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span><br><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="keyword">operator</span><span class="special">()</span> <span class="keyword">const</span></code> 只是调 用 <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> + <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="keyword">operator</span><span class="special">()</span> <span class="keyword">const</span></code> just calls <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code><br> <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="keyword">operator</span><span class="special">()</span> <span class="keyword">const</span></code> &#21482;&#26159;&#35843;&#29992; + <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code>
       </p>
 <p>
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
@@ -274,34 +309,38 @@
 <p>
This <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">internal</a> static member function determines if the value <code class="computeroutput"><span class="identifier">s</span></code> - can be represented by the target type without overflow.<br>该 <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">内 部</a> - 静态成员函数判断值 <code class="computeroutput"><span class="identifier">s</span></code>
-        是否可以被目标类型表示而没有溢出。
+ can be represented by the target type without overflow.<br> &#35813; <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">&#20869;&#37096;</a> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#21028;&#26029;&#20540; <code class="computeroutput"><span class="identifier">s</span></code> + &#26159;&#21542;&#21487;&#20197;&#34987;&#30446;&#26631;&#31867;&#22411;&#34920;&#31034;&#32780;&#27809;&#26377;&#28322;&#20986;&#12290;
       </p>
 <p>
It does not determine if the conversion is <span class="emphasis"><em>exact</em></span>; that is, it does not detect <span class="emphasis"><em>inexact</em></span> conversions, only <span class="emphasis"><em>out-of-range</em></span> - conversions (see the <a class="link" href="definitions.html#numeric_conversion_definitions_roundoff">Definitions</a> - for further details).<br>它不判断转换是否 <span class="emphasis"><em>精确</em></span>;即它不检查 <span class="emphasis"><em>非精确的</em></span> 转换,只检查 <span class="emphasis"><em>超出范围的</em></span> - 转换(进一步的细节请见 <a class="link" href="definitions.html#numeric_conversion_definitions_roundoff">定义</a>)。 </p><p> - The return value is of enum type <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_converter_policies_range_check_result"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">range_check_result</span></code></a><br>返回值为枚举类型 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_converter_policies_range_check_result"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">range_check_result</span></code></a> + conversions (see the <a class="link" href="definitions.html#boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations" title="Exact, Correctly Rounded and Out-Of-Range Representations &#31934;&#30830;&#30340;&#12289;&#36866;&#24403;&#33293;&#20837;&#30340;&#21644;&#36229;&#20986;&#33539;&#22260;&#30340;&#34920;&#31034;&#27861;">Definitions</a> + for further details).<br> &#23427;&#19981;&#21028;&#26029;&#36716;&#25442;&#26159;&#21542; <span class="emphasis"><em>&#31934;&#30830;</em></span>&#65307;&#21363;&#23427;&#19981;&#26816;&#26597; + <span class="emphasis"><em>&#38750;&#31934;&#30830;&#30340;</em></span> &#36716;&#25442;&#65292;&#21482;&#26816;&#26597; <span class="emphasis"><em>&#36229;&#20986;&#33539;&#22260;&#30340;</em></span> + &#36716;&#25442;(&#36827;&#19968;&#27493;&#30340;&#32454;&#33410;&#35831;&#35265; <a class="link" href="definitions.html#boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations" title="Exact, Correctly Rounded and Out-Of-Range Representations &#31934;&#30830;&#30340;&#12289;&#36866;&#24403;&#33293;&#20837;&#30340;&#21644;&#36229;&#20986;&#33539;&#22260;&#30340;&#34920;&#31034;&#27861;">&#23450;&#20041;</a>)&#12290;
       </p>
-
+<p>
+ The return value is of enum type <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result" title="enum range_check_result"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">range_check_result</span></code></a><br> &#36820;&#22238;&#20540;&#20026;&#26522;&#20030;&#31867;&#22411; + <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result" title="enum range_check_result"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">range_check_result</span></code></a>
+      </p>
 <p>
The actual code for the range checking logic is optimized for the combined properties of the source and target types. For example, a non-subranged conversion (i.e: <code class="computeroutput"><span class="keyword">int</span></code>-&gt;<code class="computeroutput"><span class="keyword">float</span></code>), requires no range checking, so <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> returns <code class="computeroutput"><span class="identifier">cInRange</span></code> directly. - See the following <a class="link" href="converter___function_object.html#numeric_conversion_converter_range_checking_logic">table</a> - for more details.<br>范围检查逻辑的实际代码是根据源类型和目标类型的 组合特性进行优化的。例如,一个非子范围的转换(如:<code class="computeroutput"><span class="keyword">int</span></code>-&gt;<code class="computeroutput"><span class="keyword">float</span></code>),就不需要 范围检查,所以 <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> - 直接返回 <code class="computeroutput"><span class="identifier">cInRange</span></code>。更多细节请见后文中的&nbsp;<a class="link" href="converter___function_object.html#numeric_conversion_converter_range_checking_logic">表 格</a>。 + See the following <a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic" title="Range Checking Logic &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;">table</a> + for more details.<br> &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#30340;&#23454;&#38469;&#20195;&#30721;&#26159;&#26681;&#25454;&#28304;&#31867;&#22411;&#21644;&#30446;&#26631;&#31867;&#22411;&#30340;&#32452;&#21512;&#29305;&#24615;&#36827;&#34892;&#20248;&#21270;&#30340;&#12290;&#20363;&#22914;&#65292;&#19968;&#20010;&#38750;&#23376;&#33539;&#22260;&#30340;&#36716;&#25442;(&#22914;&#65306;<code class="computeroutput"><span class="keyword">int</span></code>-&gt;<code class="computeroutput"><span class="keyword">float</span></code>)&#65292; + &#23601;&#19981;&#38656;&#35201;&#33539;&#22260;&#26816;&#26597;&#65292;&#25152;&#20197; <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> &#30452;&#25509;&#36820;&#22238; <code class="computeroutput"><span class="identifier">cInRange</span></code>&#12290;&#26356;&#22810;&#32454;&#33410;&#35831;&#35265;&#21518;&#25991;&#20013;&#30340; + <a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic" title="Range Checking Logic &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;">&#34920;&#26684;</a>&#12290;
       </p>
 <p>
- If the user supplied a <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> + If the user supplied a <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a> policy, is this policy which implements this function, so the implementation is user defined, although it is expected to perform the same conceptual check - and return the appropriate result.<br>如果用户提供了一个 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> - 策略,该策略要实现这个函数,则该实现就是用户自定义的,当然所期望的 是要执行相同概念上的检查并返回适当的结果。 + and return the appropriate result.<br> &#22914;&#26524;&#29992;&#25143;&#25552;&#20379;&#20102;&#19968;&#20010; <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a> + &#31574;&#30053;&#65292; &#35813;&#31574;&#30053;&#35201;&#23454;&#29616;&#36825;&#20010;&#20989;&#25968;&#65292;&#21017;&#35813;&#23454;&#29616;&#23601;&#26159;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#65292;&#24403;&#28982;&#25152;&#26399;&#26395;&#30340;&#26159;&#35201;&#25191;&#34892;&#30456;&#21516;&#27010;&#24565;&#19978;&#30340;&#26816;&#26597;&#24182;&#36820;&#22238;&#36866;&#24403;&#30340;&#32467;&#26524;&#12290;
       </p>
 <p>
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
@@ -314,7 +353,7 @@
<span class="identifier">numeric_converter</span><span class="special">&lt;&gt;::</span><span class="identifier">validate_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span>
             <span class="special">)</span> <span class="special">;</span>
-            <span class="comment">// no throw 无抛出 </span></code>
+ <span class="comment">// no throw &#26080;&#25243;&#20986; </span></code>
           </p>
 <p>
         </p>
@@ -322,23 +361,22 @@
 <p>
This <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">internal</a> static member function calls out_of_range(s), and passes the result to the - <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler">OverflowHandler</a> - policy class.<br>该 <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">内 部</a>
-        静态成员函数调用 out_of_range(s),并将结果传给
- <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler">OverflowHandler</a>
-        策略类。
+ <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler" title="Policy OverflowHandler &#31574;&#30053;OverflowHandler">OverflowHandler</a> + policy class.<br> &#35813; <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">&#20869;&#37096;</a> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#35843;&#29992; out_of_range(s)&#65292;&#24182;&#23558;&#32467;&#26524;&#20256;&#32473; <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler" title="Policy OverflowHandler &#31574;&#30053;OverflowHandler">OverflowHandler</a>
+        &#31574;&#30053;&#31867;&#12290;
       </p>
 <p>
For those Target/Source combinations which don't require range checking, - this is an empty inline function.<br>对于那些不需要范围检查的目标 /源类型组合,它是一个空的内联函数。 + this is an empty inline function.<br> &#23545;&#20110;&#37027;&#20123;&#19981;&#38656;&#35201;&#33539;&#22260;&#26816;&#26597;&#30340;&#30446;&#26631;/&#28304;&#31867;&#22411;&#32452;&#21512;&#65292;&#23427;&#26159;&#19968;&#20010;&#31354;&#30340;&#20869;&#32852;&#20989;&#25968;&#12290;
       </p>
 <p>
- If the user supplied a <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> + If the user supplied a <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a> policy, is this policy which implements this function, so the implementation is user defined, although it is expected to perform the same action as the default. In particular, it is expected to pass the result of the check to - the overflow handler.<br>如果用户提供了一个 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> - 策略,该策略要实现这个函数,则该实现就是用户自定义的,当然所期望的 是要执行与缺省相同的动作。特别是,要将检查的结果传递给溢出处理器。 + the overflow handler.<br> &#22914;&#26524;&#29992;&#25143;&#25552;&#20379;&#20102;&#19968;&#20010; <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a> + &#31574;&#30053;&#65292; &#35813;&#31574;&#30053;&#35201;&#23454;&#29616;&#36825;&#20010;&#20989;&#25968;&#65292;&#21017;&#35813;&#23454;&#29616;&#23601;&#26159;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#65292;&#24403;&#28982;&#25152;&#26399;&#26395;&#30340;&#26159;&#35201;&#25191;&#34892;&#19982;&#32570;&#30465;&#30456;&#21516;&#30340;&#21160;&#20316;&#12290;&#29305;&#21035;&#26159;&#65292;&#35201;&#23558;&#26816;&#26597;&#30340;&#32467;&#26524;&#20256;&#36882;&#32473;&#28322;&#20986;&#22788;&#29702;&#22120;&#12290;
       </p>
 <p>
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
@@ -357,13 +395,13 @@
 </blockquote></div>
 <p>
This <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">internal</a> - static member function performs the actual conversion.<br>该 <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">内 部</a>
-        静态成员函数执行实际的转换。
+ static member function performs the actual conversion.<br> &#35813; <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">&#20869;&#37096;</a> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#25191;&#34892;&#23454;&#38469;&#30340;&#36716;&#25442;&#12290;
       </p>
 <p>
- This function is externally supplied by the <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_raw_converter">RawConverter</a> - policy class.<br>该函数在外部由 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_raw_converter">RawConverter</a>
-        策略类提供。
+ This function is externally supplied by the <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">RawConverter</a> + policy class.<br> &#35813;&#20989;&#25968;&#22312;&#22806;&#37096;&#30001; <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">RawConverter</a>
+        &#31574;&#30053;&#31867;&#25552;&#20379;&#12290;
       </p>
 <p>
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
@@ -385,53 +423,57 @@
static member function, which is <span class="underline">only used</span> for <code class="computeroutput"><span class="keyword">float</span></code> to <code class="computeroutput"><span class="keyword">int</span></code> conversions, returns an <span class="emphasis"><em>integer</em></span> value of <span class="emphasis"><em><span class="underline">floating-point type</span></em></span> according to some - rounding direction.<br>该 <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">内 部</a> - 静态成员函数,<span class="underline">仅用于</span> <code class="computeroutput"><span class="keyword">float</span></code> 至 <code class="computeroutput"><span class="keyword">int</span></code> - 的转换,根据某个舍入的方向返回<span class="emphasis"><em><span class="underline">浮点数类型</span></em></span>的一个<span class="emphasis"><em>整数</em></span>值。 + rounding direction.<br> &#35813; <a class="link" href="converter___function_object.html#numeric_conversion_converter_internal">&#20869;&#37096;</a> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#65292;<span class="underline">&#20165;&#29992;&#20110;</span> <code class="computeroutput"><span class="keyword">float</span></code> &#33267; <code class="computeroutput"><span class="keyword">int</span></code> + &#30340;&#36716;&#25442;&#65292; &#26681;&#25454;&#26576;&#20010;&#33293;&#20837;&#30340;&#26041;&#21521;&#36820;&#22238; <span class="emphasis"><em><span class="underline">&#28014;&#28857;&#25968;&#31867;&#22411;</span></em></span> + &#30340;&#19968;&#20010;<span class="emphasis"><em>&#25972;&#25968;</em></span>&#20540;&#12290;
       </p>
 <p>
- This function is externally supplied by the <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_float_to_int_rounder">Float2IntRounder</a> - policy class which encapsulates the specific rounding mode.<br>该函 数在外部由封装了特定舍入方式的 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_float_to_int_rounder">Float2IntRounder</a>
-        策略类提供。
+ This function is externally supplied by the <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder" title="Policy Float2IntRounder &#31574;&#30053;Float2IntRounder">Float2IntRounder</a> + policy class which encapsulates the specific rounding mode.<br> &#35813;&#20989;&#25968;&#22312;&#22806;&#37096;&#30001;&#23553;&#35013;&#20102;&#29305;&#23450;&#33293;&#20837;&#26041;&#24335;&#30340; + <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder" title="Policy Float2IntRounder &#31574;&#30053;Float2IntRounder">Float2IntRounder</a>
+        &#31574;&#30053;&#31867;&#25552;&#20379;&#12290;
       </p>
 <p>
<span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
       </p>
 <a name="numeric_conversion_converter_internal"></a><p>
       </p>
-<a name="boost_numericconversion.converter___function_object.member_functions.internal_member_functions"></a><h5>
-<a name="id2644439"></a>
- <a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.member_functions.internal_member_functions">Internal
-        Member Functions 内部成员函数</a>
+<a name="boost_numericconversion.converter___function_object.member_functions.internal_member_functions___________________"></a><h5>
+<a name="id4873278"></a>
+ <a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.member_functions.internal_member_functions___________________">Internal + Member Functions &#20869;&#37096;&#25104;&#21592;&#20989;&#25968;</a>
       </h5>
 <p>
These static member functions build the actual conversion code used by <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code>. The user does not have to call these if calling <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code>, since <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> calls them infernally, but they can be - called separately for specific needs.<br>这些静态成员函数构建了用 于 <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> 的实 际转换代码。用户代码如果调用了 <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> 就无 需调用它们,因为 <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> 已经 在内部调用了它们,不过如果有特别需要,它们也可以被单独调用。 + called separately for specific needs.<br> &#36825;&#20123;&#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#26500;&#24314;&#20102;&#29992;&#20110; + <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> + &#30340;&#23454;&#38469;&#36716;&#25442;&#20195;&#30721;&#12290;&#29992;&#25143;&#20195;&#30721;&#22914;&#26524;&#35843;&#29992;&#20102; <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> &#23601;&#26080;&#38656;&#35843;&#29992;&#23427;&#20204;&#65292; &#22240;&#20026; <code class="computeroutput"><span class="identifier">convert</span><span class="special">()</span></code> + &#24050;&#32463;&#22312;&#20869;&#37096;&#35843;&#29992;&#20102;&#23427;&#20204;&#65292;&#19981;&#36807;&#22914;&#26524;&#26377;&#29305;&#21035;&#38656;&#35201;&#65292;&#23427;&#20204;&#20063;&#21487;&#20197;&#34987;&#21333;&#29420;&#35843;&#29992;&#12290;
       </p>
 </div>
-<a name="numeric_conversion_converter_range_checking_logic"></a><p>
-    </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.converter___function_object.range_checking_logic"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic" title="Range Checking Logic">Range
-      Checking Logic 范围检查逻辑</a>
+<a name="boost_numericconversion.converter___function_object.range_checking_logic"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic" title="Range Checking Logic &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;"> + Range Checking Logic &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;</a>
 </h3></div></div></div>
 <p>
The following table summarizes the internal range checking logic performed - for each combination of the properties of Source and Target.<br>下 表总结了对各种源类型和目标类型组合所执行的内部范围检查逻辑。 + for each combination of the properties of Source and Target.<br> &#19979;&#34920;&#24635;&#32467;&#20102;&#23545;&#21508;&#31181;&#28304;&#31867;&#22411;&#21644;&#30446;&#26631;&#31867;&#22411;&#32452;&#21512;&#25152;&#25191;&#34892;&#30340;&#20869;&#37096;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#12290;
       </p>
 <p>
LowestT/HighestT denotes the highest and lowest values of the Target type, - respectively.<br>LowestT/HighestT 分别表示目标类型的最大值和最小 值。 + respectively.<br> LowestT/HighestT &#20998;&#21035;&#34920;&#31034;&#30446;&#26631;&#31867;&#22411;&#30340;&#26368;&#22823;&#20540;&#21644;&#26368;&#23567;&#20540;&#12290;
       </p>
 <p>
<code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code> is short - for <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="identifier">n</span><span class="special">)</span></code> (<code class="computeroutput"><span class="identifier">S</span></code> denotes the Source type).<br><code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code> 是 <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="identifier">n</span><span class="special">)</span></code> 的缩写(<code class="computeroutput"><span class="identifier">S</span></code> 表示源类型)。 + for <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="identifier">n</span><span class="special">)</span></code> (<code class="computeroutput"><span class="identifier">S</span></code> denotes the Source type).<br> <code class="computeroutput"><span class="identifier">S</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code> &#26159; <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="identifier">n</span><span class="special">)</span></code> &#30340;&#32553;&#20889;(<code class="computeroutput"><span class="identifier">S</span></code> &#34920;&#31034;&#28304;&#31867;&#22411;)&#12290;
       </p>
 <p>
<code class="computeroutput"><span class="identifier">NONE</span></code> indicates that for this - case there is no range checking.<br><code class="computeroutput"><span class="identifier">NONE</span></code> 表示此种 情况无范围检查。 + case there is no range checking.<br> <code class="computeroutput"><span class="identifier">NONE</span></code> + &#34920;&#31034;&#27492;&#31181;&#24773;&#20917;&#26080;&#33539;&#22260;&#26816;&#26597;&#12290;
       </p>
 <pre class="programlisting"><code class="literal">
int_to_int |--&gt; sig_to_sig |--&gt; subranged |--&gt; ( s &gt;= S(LowestT) ) &amp;&amp; ( s &lt;= S(HighestT) )
@@ -463,7 +505,8 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.converter___function_object.examples"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.examples" title="Examples">Examples 例子</a> +<a name="boost_numericconversion.converter___function_object.examples"></a><a class="link" href="converter___function_object.html#boost_numericconversion.converter___function_object.examples" title="Examples &#20363;&#23376;">
+      Examples &#20363;&#23376;</a>
 </h3></div></div></div>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cassert</span><span class="special">&gt;</span> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">converter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
@@ -475,11 +518,15 @@
<span class="keyword">int</span> <span class="identifier">x</span> <span class="special">=</span> <span class="identifier">Double2Int</span><span class="special">::</span><span class="identifier">convert</span><span class="special">(</span><span class="number">2.0</span><span class="special">);</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="identifier">x</span> <span class="special">==</span> <span class="number">2</span> <span class="special">);</span>

- <span class="keyword">int</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">Double2Int</span><span class="special">()(</span><span class="number">3.14</span><span class="special">);</span> <span class="comment">// As a function object. 因为是函数对象。<br></span> <span class="identifier">assert</span> <span class="special">(</span> <span class="identifier">y</span> <span class="special">==</span> <span class="number">3</span> <span class="special">)</span> <span class="special">;</span> <span class="comment">// The default rounding is trunc. 缺省的舍入方式是截断。<br></span> + <span class="keyword">int</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">Double2Int</span><span class="special">()(</span><span class="number">3.14</span><span class="special">);</span> <span class="comment">// As a function object. &#20316;&#20026;&#19968;&#20010;&#20989;&#25968;&#23545;&#35937;&#12290; +</span> <span class="identifier">assert</span> <span class="special">(</span> <span class="identifier">y</span> <span class="special">==</span> <span class="number">3</span> <span class="special">)</span> <span class="special">;</span> <span class="comment">// The default rounding is trunc. &#32570;&#30465;&#30340;&#33293;&#20837;&#26041;&#24335;&#26159;&#25130;&#26029;&#12290;
+</span>
     <span class="keyword">try</span>
     <span class="special">{</span>
<span class="keyword">double</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bounds</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;::</span><span class="identifier">highest</span><span class="special">();</span> - <span class="keyword">int</span> <span class="identifier">z</span> <span class="special">=</span> <span class="identifier">Double2Int</span><span class="special">::</span><span class="identifier">convert</span><span class="special">(</span><span class="identifier">m</span><span class="special">);</span> <span class="comment">// By default throws positive_overflow()<br> // 缺省抛出 positive_overflow()<br></span> <span class="special">}</span> + <span class="keyword">int</span> <span class="identifier">z</span> <span class="special">=</span> <span class="identifier">Double2Int</span><span class="special">::</span><span class="identifier">convert</span><span class="special">(</span><span class="identifier">m</span><span class="special">);</span> <span class="comment">// By default throws positive_overflow() +</span> <span class="comment">// &#32570;&#30465;&#25243;&#20986; positive_overflow()
+</span>    <span class="special">}</span>
<span class="keyword">catch</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">positive_overflow</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">)</span>
     <span class="special">{</span>
     <span class="special">}</span>
@@ -489,16 +536,17 @@
 </pre>
 </div>
 </div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tbody><tr> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2004 -2007 Fernando Luis Cacciola Carballal<p> +<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>)
       </p>
 </div></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="definitions.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="type_requirements_and_user_defined_types_support.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html Mon Mar 22 20:44:11 2010
@@ -1,1155 +1,1252 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Definitions</title>
-
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Definitions &#23450;&#20041;</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="prev" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="next" href="converter___function_object.html" title="converter&lt;&gt; function object"></head> -<body style="color: black; background-color: white;" alink="#0000ff" link="#0000ff" vlink="#840084">
-<table cellpadding="2" width="100%">
-<tbody>
-<tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="next" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr>
-</tbody>
-</table>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="../index.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="converter___function_object.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a></div>
-<div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both;"><a name="boost_numericconversion.definitions"></a><a class="link" href="definitions.html" title="Definitions">Definitions
-定义</a>
-</h2>
-</div>
-</div>
-</div>
-<div class="toc">
-<dl>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.introduction">Introduction
-简介</a></span></dt>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.types_and_values">Types
-and Values 类型与值</a></span></dt>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.c___arithmetic_types">C++
-Arithmetic Types &nbsp;C++的算术类型</a></span></dt>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
-Types 数字类型</a></span></dt>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.range_and_precision">Range
-and Precision 范围和精度</a></span></dt>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations">Exact, -Correctly Rounded and Out-Of-Range Representations 精确的、适当舍入的和超出 范围的表示法</a></span></dt> -<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.standard__numeric__conversions">Standard
-(numeric) Conversions 标准的(数字)转换</a></span></dt>
-<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype">Subranged -Conversion Direction, Subtype and Supertype 子范围转换方向、子类型和父类型 </a></span></dt>
-</dl>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="converter___function_object.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.definitions.introduction"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.introduction" title="Introduction">Introduction 简介</a>
-</h3>
-</div>
-</div>
-</div>
-<p> This section provides definitions of terms used in the
-Numeric Conversion library.<br>
-本节提供了在 Numeric Conversion 库中所使用的术语的定义。 </p>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_numericconversion.definitions"></a><a class="link" href="definitions.html" title="Definitions &#23450;&#20041;"> Definitions &#23450;&#20041;</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.introduction"> Introduction
+      &#31616;&#20171;</a></span></dt>
+<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.types_and_values">
+      Types and Values &#31867;&#22411;&#19982;&#20540;</a></span></dt>
+<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.c___arithmetic_types"> + C++ Arithmetic Types C++&#31639;&#26415;&#31867;&#22411;</a></span></dt> +<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.numeric_types"> Numeric
+      Types &#25968;&#23383;&#31867;&#22411;</a></span></dt>
+<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.range_and_precision"> + Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;</a></span></dt> +<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations"> + Exact, Correctly Rounded and Out-Of-Range Representations &#31934;&#30830;&#30340;&#12289;&#36866;&#24403;&#33293;&#20837;&#30340;&#21644;&#36229;&#20986;&#33539;&#22260;&#30340;&#34920;&#31034;&#27861;</a></span></dt> +<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.standard__numeric__conversions"> + Standard (numeric) Conversions &#26631;&#20934;&#30340;(&#25968;&#23383;)&#36716;&#25442;</a></span></dt> +<dt><span class="section"><a href="definitions.html#boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype"> + Subranged Conversion Direction, Subtype and Supertype &#23376;&#33539;&#22260;&#36716;&#25442;&#26041;&#21521;&#12289;&#23376;&#31867;&#22411;&#21644;&#29238;&#31867;&#22411;</a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.definitions.introduction"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.introduction" title="Introduction &#31616;&#20171;"> Introduction
+      &#31616;&#20171;</a>
+</h3></div></div></div>
+<p>
+ This section provides definitions of terms used in the Numeric Conversion + library.<br> &#26412;&#33410;&#25552;&#20379;&#20102;&#22312; Numeric Conversion &#24211;&#20013;&#25152;&#20351;&#29992;&#30340;&#26415;&#35821;&#30340;&#23450;&#20041;&#12290;
+      </p>
 <div class="sidebar">
-<p><span class="bold"><strong>Notation</strong></span>
-<span class="underline">underlined text</span>
-denotes terms defined in the C++ standard.<br>
-<span class="bold"><strong>记号</strong></span>
-<span class="underline">带下划线的文字</span>
-表示在C++标准中定义的术语。 </p>
-<p> <span class="bold"><strong>bold face</strong></span>
-denotes terms defined here but not in the standard.<br>
-<span class="bold"><strong>黒体字</strong></span>
-表示在本文中定义而标准中没有的术语。 </p>
+<p class="title"><b></b></p>
+<p>
+ <span class="bold"><strong>Notation</strong></span> <span class="underline">underlined + text</span> denotes terms defined in the C++ standard.<br> <span class="bold"><strong>&#35760;&#21495;</strong></span> <span class="underline">&#24102;&#19979;&#21010;&#32447;&#30340;&#25991;&#23383;</span> + &#34920;&#31034;&#22312;C++&#26631;&#20934;&#20013;&#23450;&#20041;&#30340;&#26415;&#35821;&#12290;
+      </p>
+<p>
+ <span class="bold"><strong>bold face</strong></span> denotes terms defined here but + not in the standard.<br> <span class="bold"><strong>&#40658;&#20307;&#23383;</strong></span> &#34920;&#31034;&#22312;&#26412;&#25991;&#20013;&#23450;&#20041;&#32780;&#26631;&#20934;&#20013;&#27809;&#26377;&#30340;&#26415;&#35821;&#12290;
+      </p>
 </div>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.definitions.types_and_values"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.types_and_values" title="Types and Values">Types and Values 类型与值</a>
-</h3>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.definitions.types_and_values"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.types_and_values" title="Types and Values &#31867;&#22411;&#19982;&#20540;">
+      Types and Values &#31867;&#22411;&#19982;&#20540;</a>
+</h3></div></div></div>
+<p>
+        As defined by the <span class="underline">C++ Object Model</span>
+ (&#167;1.7) the <span class="underline">storage</span> or memory on which + a C++ program runs is a contiguous sequence of <span class="underline">bytes</span> + where each byte is a contiguous sequence of bits.<br> &#22914; <span class="underline">C++&#23545;&#35937;&#27169;&#22411;</span> + (&#167;1.7) &#20013;&#25152;&#23450;&#20041;&#30340;&#65292;&#19968;&#20010;C++&#31243;&#24207;&#36816;&#34892;&#20110;&#20854;&#19978;&#30340; <span class="underline">&#23384;&#20648;</span> + &#25110;&#20869;&#23384;&#26159;&#25351;&#19968;&#27573;&#36830;&#32493;&#30340; <span class="underline">&#23383;&#33410;</span>&#65292;&#20854;&#20013;&#27599;&#20010;&#23383;&#33410;&#37117;&#26159;&#19968;&#27573;&#36830;&#32493;&#30340;&#20108;&#36827;&#21046;&#20301;&#12290;
+      </p>
+<p>
+ An <span class="underline">object</span> is a region of storage (&#167;1.8) + and has a type (&#167;3.9).<br> &#19968;&#20010; <span class="underline">&#23545;&#35937;</span> + &#26159;&#25351;&#19968;&#22359;&#23384;&#20648;(&#167;1.8)&#65292;&#23427;&#20855;&#26377;&#26576;&#31181;&#31867;&#22411;(&#167;3.9)&#12290;
+      </p>
+<p>
+ A <span class="underline">type</span> is a discrete set of values.<br> + &#19968;&#20010; <span class="underline">&#31867;&#22411;</span> &#26159;&#25351;&#22810;&#20010;&#20540;&#30340;&#19968;&#20010;&#31163;&#25955;&#38598;&#12290;
+      </p>
+<p>
+ An object of type <code class="computeroutput"><span class="identifier">T</span></code> has an
+        <span class="underline">object representation</span> which is the
+ sequence of bytes stored in the object (&#167;3.9/4)<br> &#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#30340;&#19968;&#20010;&#23545;&#35937;&#26377;&#19968;&#20010; <span class="underline">&#23545;&#35937;&#34920;&#31034;&#27861;</span>&#65292;&#21363;&#20445;&#23384;&#22312;&#35813;&#23545;&#35937;&#20013;&#30340;&#19968;&#27573;&#23383;&#33410;(&#167;3.9/4)
+      </p>
+<p>
+ An object of type <code class="computeroutput"><span class="identifier">T</span></code> has a + <span class="underline">value representation</span> which is the set + of bits that determine the <span class="emphasis"><em>value</em></span> of an object of that + type (&#167;3.9/4). For <span class="underline">POD</span> types (&#167;3.9/10), + this bitset is given by the object representation, but not all the bits in + the storage need to participate in the value representation (except for character + types): for example, some bits might be used for padding or there may be + trap-bits.<br> &#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> + &#30340;&#19968;&#20010;&#23545;&#35937;&#26377;&#19968;&#20010; <span class="underline">&#20540;&#34920;&#31034;&#27861;</span>&#65292;&#21363;&#19968;&#32452;&#20108;&#36827;&#21046;&#20301;&#30340;&#38598;&#21512;&#65292;&#23427;&#20915;&#23450;&#20102;&#35813;&#31867;&#22411;&#30340;&#19968;&#20010;&#23545;&#35937;&#30340;<span class="emphasis"><em>&#20540;</em></span>(&#167;3.9/4)&#12290; + &#23545;&#20110; <span class="underline">POD</span> &#31867;&#22411;(&#167;3.9/10)&#65292;&#36825;&#20010;&#20301;&#38598;&#21512;&#23601;&#26159;&#30001;&#23545;&#35937;&#34920;&#31034;&#27861;&#25152;&#32473;&#23450;&#30340;&#65292;&#20294;&#19981;&#26159;&#22312;&#23384;&#20648;&#20013;&#30340;&#27599;&#20010;&#20108;&#36827;&#21046;&#20301;&#37117;&#38656;&#35201;&#29992;&#20110;&#20540;&#34920;&#31034;&#27861;(&#38500;&#20102;&#23383;&#31526;&#31867;&#22411;&#20197;&#22806;)&#65306; + &#20363;&#22914;&#65292;&#26377;&#20123;&#20108;&#36827;&#21046;&#20301;&#21487;&#33021;&#34987;&#29992;&#20110;&#22635;&#20805;&#25110;&#32773;&#26159; trap-bits&#12290;
+      </p>
+<p>
+ <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
+      </p>
+<p>
+ The <span class="bold"><strong>typed value</strong></span> that is held by an object + is the value which is determined by its value representation.<br> &#30001;&#19968;&#20010;&#23545;&#35937;&#25152;&#25345;&#26377;&#30340; + <span class="bold"><strong>&#26377;&#31867;&#22411;&#20540;</strong></span> &#21363;&#26159;&#30001;&#23427;&#30340;&#20540;&#34920;&#31034;&#27861;&#25152;&#30830;&#23450;&#30340;&#20540;&#12290;
+      </p>
+<p>
+ An <span class="bold"><strong>abstract value</strong></span> (untyped) is the conceptual + information that is represented in a type (i.e. the number &#960;).<br> <span class="bold"><strong>&#25277;&#35937;&#20540;</strong></span> (&#26080;&#31867;&#22411;&#30340;) &#26159;&#25351;&#22312;&#31867;&#22411;&#20013;&#25152;&#34920;&#31034;&#30340;&#27010;&#24565;&#19978;&#30340;&#20449;&#24687;(&#22914;&#25968;&#23383;
+        &#960;)&#12290;
+      </p>
+<p>
+ The <span class="bold"><strong>intrinsic value</strong></span> of an object is the + binary value of the sequence of unsigned characters which form its object + representation.<br> &#19968;&#20010;&#23545;&#35937;&#30340; <span class="bold"><strong>&#22266;&#26377;&#20540;</strong></span> + &#26159;&#25351;&#24418;&#25104;&#20854;&#23545;&#35937;&#34920;&#31034;&#27861;&#30340;&#19968;&#20018;&#26080;&#31526;&#21495;&#23383;&#31526;&#30340;&#20108;&#36827;&#21046;&#20540;&#12290;
+      </p>
+<p>
+ <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
+      </p>
+<p>
+ <span class="emphasis"><em>Abstract</em></span> values can be <span class="bold"><strong>represented</strong></span> + in a given type.<br> <span class="emphasis"><em>&#25277;&#35937;&#20540;</em></span> &#21487;&#20197;&#22312;&#19968;&#20010;&#32473;&#23450;&#31867;&#22411;&#20013;&#36827;&#34892;
+        <span class="bold"><strong>&#34920;&#31034;</strong></span>&#12290;
+      </p>
+<p>
+ To <span class="bold"><strong>represent</strong></span> an abstract value <code class="computeroutput"><span class="identifier">V</span></code> in a type <code class="computeroutput"><span class="identifier">T</span></code> + is to obtain a typed value <code class="computeroutput"><span class="identifier">v</span></code> + which corresponds to the abstract value <code class="computeroutput"><span class="identifier">V</span></code>.<br> + &#22312;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#20013; <span class="bold"><strong>&#34920;&#31034;</strong></span> &#25277;&#35937;&#20540; <code class="computeroutput"><span class="identifier">V</span></code> + &#26159;&#25351;&#65292;&#33719;&#24471;&#19968;&#20010;&#26377;&#31867;&#22411;&#20540; <code class="computeroutput"><span class="identifier">v</span></code>&#65292;&#23427;&#23545;&#24212;&#20110;&#25277;&#35937;&#20540; + <code class="computeroutput"><span class="identifier">V</span></code>.
+      </p>
+<p>
+ The operation is denoted using the <code class="computeroutput"><span class="identifier">rep</span><span class="special">()</span></code> operator, as in: <code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">rep</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>. <code class="computeroutput"><span class="identifier">v</span></code> is the <span class="bold"><strong>representation</strong></span> + of <code class="computeroutput"><span class="identifier">V</span></code> in the type <code class="computeroutput"><span class="identifier">T</span></code>.<br> &#36825;&#19968;&#25805;&#20316;&#29992; <code class="computeroutput"><span class="identifier">rep</span><span class="special">()</span></code> &#25805;&#20316;&#31526;&#26469;&#34920;&#31034;&#65292;&#22914;&#65306;<code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">rep</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>. + <code class="computeroutput"><span class="identifier">v</span></code> &#26159;&#22312;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#20013;&#30340; <code class="computeroutput"><span class="identifier">V</span></code> + &#30340; <span class="bold"><strong>&#34920;&#31034;&#27861;</strong></span>&#12290;
+      </p>
+<p>
+ For example, the abstract value &#960; can be represented in the type <code class="computeroutput"><span class="keyword">double</span></code> as the <code class="computeroutput"><span class="keyword">double</span> + <span class="identifier">value</span> <span class="identifier">M_PI</span></code> + and in the type <code class="computeroutput"><span class="keyword">int</span></code> as the + <code class="computeroutput"><span class="keyword">int</span> <span class="identifier">value</span> + <span class="number">3</span></code><br> &#20363;&#22914;&#65292;&#25277;&#35937;&#20540; &#960; &#21487;&#20197;&#22312;&#31867;&#22411; + <code class="computeroutput"><span class="keyword">double</span></code> &#20013;&#34920;&#31034;&#20026; <code class="computeroutput"><span class="keyword">double</span> <span class="identifier">value</span> + <span class="identifier">M_PI</span></code>&#65292;&#32780;&#22312;&#31867;&#22411; <code class="computeroutput"><span class="keyword">int</span></code> &#20013;&#34920;&#31034;&#20026; <code class="computeroutput"><span class="keyword">int</span> + <span class="identifier">value</span> <span class="number">3</span></code>
+      </p>
+<p>
+ <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
+      </p>
+<p>
+ Conversely, <span class="emphasis"><em>typed values</em></span> can be <span class="bold"><strong>abstracted</strong></span>.<br> + &#21453;&#20043;&#65292;<span class="emphasis"><em>&#26377;&#31867;&#22411;&#20540;</em></span> &#20063;&#21487;&#20197;&#34987; <span class="bold"><strong>&#25277;&#35937;</strong></span>&#12290;
+      </p>
+<p>
+ To <span class="bold"><strong>abstract</strong></span> a typed value <code class="computeroutput"><span class="identifier">v</span></code> of type <code class="computeroutput"><span class="identifier">T</span></code> + is to obtain the abstract value <code class="computeroutput"><span class="identifier">V</span></code> + whose representation in <code class="computeroutput"><span class="identifier">T</span></code> + is <code class="computeroutput"><span class="identifier">v</span></code>.<br> &#35201; <span class="bold"><strong>&#25277;&#35937;</strong></span> &#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> + &#30340;&#19968;&#20010;&#26377;&#31867;&#22411;&#20540; <code class="computeroutput"><span class="identifier">v</span></code>&#65292;&#23601;&#26159;&#24471;&#21040;&#19968;&#20010;&#22312; + <code class="computeroutput"><span class="identifier">T</span></code> &#20013;&#34920;&#31034; <code class="computeroutput"><span class="identifier">v</span></code> &#30340;&#25277;&#35937;&#20540; <code class="computeroutput"><span class="identifier">V</span></code>&#12290;
+      </p>
+<p>
+ The operation is denoted using the <code class="computeroutput"><span class="identifier">abt</span><span class="special">()</span></code> operator, as in: <code class="computeroutput"><span class="identifier">V</span><span class="special">=</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span></code>.<br> + &#36825;&#19968;&#25805;&#20316;&#29992; <code class="computeroutput"><span class="identifier">abt</span><span class="special">()</span></code> + &#25805;&#20316;&#31526;&#26469;&#34920;&#31034;&#65292;&#22914;&#65306;<code class="computeroutput"><span class="identifier">V</span><span class="special">=</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span></code>.
+      </p>
+<p>
+ <code class="computeroutput"><span class="identifier">V</span></code> is the <span class="bold"><strong>abstraction</strong></span> + of <code class="computeroutput"><span class="identifier">v</span></code> of type <code class="computeroutput"><span class="identifier">T</span></code>.<br> <code class="computeroutput"><span class="identifier">V</span></code> + &#26159;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#30340; <code class="computeroutput"><span class="identifier">v</span></code> &#20540;&#30340; <span class="bold"><strong>&#25277;&#35937;</strong></span>&#12290;
+      </p>
+<p>
+ Abstraction is just an abstract operation (you can't do it); but it is defined + nevertheless because it will be used to give the definitions in the rest + of this document.<br> &#25277;&#35937;&#21482;&#26159;&#19968;&#20010;&#25277;&#35937;&#30340;&#25805;&#20316;(&#20320;&#19981;&#33021;&#25191;&#34892;&#23427;)&#65307;&#20294;&#26159;&#25105;&#20204;&#20173;&#28982;&#23545;&#23427;&#36827;&#34892;&#23450;&#20041;&#65292;&#22240;&#20026;&#23427;&#21487;&#20197;&#29992;&#20110;&#20026;&#26412;&#25991;&#26723;&#30340;&#20854;&#20313;&#37096;&#20998;&#32473;&#20986;&#23450;&#20041;&#12290;
+      </p>
 </div>
-</div>
-</div>
-<p> As defined by the <span class="underline">C++
-Object Model</span> (§1.7) the <span class="underline">storage</span>
-or memory on which a C++ program runs is a contiguous sequence of <span class="underline">bytes</span> where each byte is a
-contiguous sequence of bits.&nbsp;<br>
-如 <span class="underline">C++ 对象模型</span> (§1.7)
-中所定义的,一个C++程序运行于其上的 <span class="underline">存储</span>
-或内存是指一段连续的 <span class="underline">字节</span>,其中每个字节都
-是一段连续的二进制位。 </p>
-<p> An <span class="underline">object</span>
-is a region of storage (§1.8) and has a type (§3.9).<br>
-一个 <span class="underline">对象</span>
-是指一块存储(§1.8),它具有某种类型(§3.9)。 </p>
-<p> A <span class="underline">type</span> is
-a discrete set of values.<br>
-一个 <span class="underline">类型</span> 是指多个值的一个离散集。 </p>
-<p> An object of type <code class="computeroutput"><span class="identifier">T</span></code> has an <span class="underline">object representation</span> which
-is the sequence of bytes stored in the object (§3.9/4)<br>
-类型 <code class="computeroutput"><span class="identifier">T</span></code> 的一个对象有一个 <span class="underline">对象表示法</span>,即保存在该对象中 的一段字节(§3.9/4) </p> -<p> An object of type <code class="computeroutput"><span class="identifier">T</span></code> has a <span class="underline">value representation</span> which is -the set of bits that determine the <span class="emphasis"><em>value</em></span>
-of an object of that type (§3.9/4). For <span class="underline">POD</span>
-types (§3.9/10), this bitset is given by the object representation, but
-not all the bits in the storage need to participate in the value
-representation (except for character types): for example, some bits
-might be used for padding or there may be trap-bits.<br>
-类型 <code class="computeroutput"><span class="identifier">T</span></code> 的一个对象有一个 <span class="underline">值表示法</span>,即一组二进制位的集 合,它决定了该类型的一个对象的<span class="emphasis"><em>值 </em></span>(§3.9/4)。
-对于 <span class="underline">POD</span>
-类型(§3.9/10),这个位集合就是由对象表示法所给定的,但不是在存储中的每个二进 制位都需要用于值表示法(除了字符类型以外):例如,有些二进制
-位可能被用于填充或者是 trap-bits。 </p>
-<p> <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span> </p>
-<p> The <span class="bold"><strong>typed value</strong></span>
-that is held by an object is the value which is determined by its value
-representation.<br>
-由一个对象所持有的 <span class="bold"><strong>有类型值</strong></span>
-即是由它的值表示法所确定的值。 </p>
-<p> An <span class="bold"><strong>abstract
-value</strong></span> (untyped) is the conceptual
-information that is represented in a type (i.e. the number π).<br>
-<span class="bold"><strong>抽象值</strong></span>
-(无类型的) 是指在类型中所表示的概念上的信息(如数字 π)。 </p>
-<p> The <span class="bold"><strong>intrinsic
-value</strong></span> of an object is the binary value of
-the sequence of unsigned characters which form its object
-representation.<br>
-一个对象的 <span class="bold"><strong>固有值</strong></span>
-是指形成其对象表示法的一串无符号字符的二进制值。 </p>
-<p> <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span> </p>
-<p> <span class="emphasis"><em>Abstract</em></span>
-values can be <span class="bold"><strong>represented</strong></span>
-in a given type.<br>
-<span class="emphasis"><em>抽象值</em></span>
-可以在一个给定类型中进行 <span class="bold"><strong>表示</strong></span>。
-</p>
-<p> To <span class="bold"><strong>represent</strong></span>
-an abstract value <code class="computeroutput"><span class="identifier">V</span></code> in a type <code class="computeroutput"><span class="identifier">T</span></code> -is to obtain a typed value <code class="computeroutput"><span class="identifier">v</span></code> which -corresponds to the abstract value <code class="computeroutput"><span class="identifier">V</span></code>.<br> -在类型 <code class="computeroutput"><span class="identifier">T</span></code> 中 <span class="bold"><strong>表示 </strong></span> -抽象值 <code class="computeroutput"><span class="identifier">V</span></code> 是指,获得一个有类型值 <code class="computeroutput"><span class="identifier">v</span></code>, -它对应于抽象值 <code class="computeroutput"><span class="identifier">V</span></code>. </p> -<p> The operation is denoted using the <code class="computeroutput"><span class="identifier">rep</span><span class="special">()</span></code> operator, as -in: <code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">rep</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>.
-<code class="computeroutput"><span class="identifier">v</span></code>
-is the <span class="bold"><strong>representation</strong></span>
-of <code class="computeroutput"><span class="identifier">V</span></code> in the type <code class="computeroutput"><span class="identifier">T</span></code>.<br> -这一操作用 <code class="computeroutput"><span class="identifier">rep</span><span class="special">()</span></code> -操作符来表示,如:<code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">rep</span><span class="special">(</span><span class="identifier">V</span><span class="special">)</span></code>.
-<code class="computeroutput"><span class="identifier">v</span></code>
-是在类型 <code class="computeroutput"><span class="identifier">T</span></code> 中的 <code class="computeroutput"><span class="identifier">V</span></code>
-的 <span class="bold"><strong>表示法</strong></span>。
-</p>
-<p> For example, the abstract value π can be represented in the
-type <code class="computeroutput"><span class="keyword">double</span></code> -as the <code class="computeroutput"><span class="keyword">double</span> <span class="identifier">value</span> <span class="identifier">M_PI</span></code> and in the
-type <code class="computeroutput"><span class="keyword">int</span></code>
-as the <code class="computeroutput"><span class="keyword">int</span> <span class="identifier">value</span>
-<span class="number">3<br>
-</span></code>例如,抽象值 π 可以在类型 <code class="computeroutput"><span class="keyword">double</span></code>
-中表示为 <code class="computeroutput"><span class="keyword">double</span>
-<span class="identifier">value</span> <span class="identifier">M_PI</span></code>,而在类型 <code class="computeroutput"><span class="keyword">int</span></code>
-中表示为 <code class="computeroutput"><span class="keyword">int</span>
-<span class="identifier">value</span> <span class="number">3</span></code> </p> -<p> <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span> </p>
-<p> Conversely, <span class="emphasis"><em>typed
-values</em></span> can be <span class="bold"><strong>abstracted</strong></span>.<br>
-反之,<span class="emphasis"><em>有类型值</em></span>
-也可以被 <span class="bold"><strong>抽象</strong></span>。
-</p>
-<p> To <span class="bold"><strong>abstract</strong></span>
-a typed value <code class="computeroutput"><span class="identifier">v</span></code> of type <code class="computeroutput"><span class="identifier">T</span></code> -is to obtain the abstract value <code class="computeroutput"><span class="identifier">V</span></code> whose -representation in <code class="computeroutput"><span class="identifier">T</span></code> is <code class="computeroutput"><span class="identifier">v</span></code>.<br>
-要 <span class="bold"><strong>抽象</strong></span>
-类型 <code class="computeroutput"><span class="identifier">T</span></code> 的一个有类型值 <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="identifier"></span></code>, -就是得到一个在 <code class="computeroutput"><span class="identifier">T</span></code> 中表示 <code class="computeroutput"><span class="identifier">v</span></code> -的抽象值 <code class="computeroutput"><span class="identifier">V</span></code><code class="computeroutput"><span class="identifier"></span></code>。&nbsp;
-</p>
-<p> The operation is denoted using the <code class="computeroutput"><span class="identifier">abt</span><span class="special">()</span></code> operator, as -in: <code class="computeroutput"><span class="identifier">V</span><span class="special">=</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span></code>.<br> -这一操作用 <code class="computeroutput"><span class="identifier">abt</span><span class="special">()</span></code> -操作符来表示,如:<code class="computeroutput"><span class="identifier">V</span><span class="special">=</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">v</span><span class="special">)</span></code>.
-</p>
-<p> <code class="computeroutput"><span class="identifier">V</span></code> is the <span class="bold"><strong>abstraction</strong></span> -of <code class="computeroutput"><span class="identifier">v</span></code> of type <code class="computeroutput"><span class="identifier">T</span></code>.<br>
-<code class="computeroutput"><span class="identifier">V</span></code>
-是类型 <code class="computeroutput"><span class="identifier">T</span></code> 的 <code class="computeroutput"><span class="identifier">v</span></code>
-值的 <span class="bold"><strong>抽象</strong></span>。
-</p>
-<p> Abstraction is just an abstract operation (you can't do it);
-but it is defined nevertheless because it will be used to give the
-definitions in the rest of this document.<br>
-抽象只是一个抽象的操作(你不能执行它);但是我们仍然对它进行定义,因为它可以 用于为本文档的其余部分给出定义。 </p>
-</div>
-<a name="numeric_conversion_cpp_arithmetic_types"></a>
-<p> </p>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.definitions.c___arithmetic_types"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.c___arithmetic_types" title="C++ Arithmetic Types">C++ Arithmetic Types
-&nbsp;C++算术类型</a>
-</h3>
-</div>
-</div>
-</div>
-<p> The C++ language defines <span class="underline">fundamental
-types</span> (§3.9.1). The following subsets of the fundamental
-types are intended to represent <span class="emphasis"><em>numbers</em></span>:<br>
-C++ 语言定义了一些 <span class="underline">基本类型</span>
-(§3.9.1)。以下是基本类型的一个子集,它们用于表示 <span class="emphasis"><em>数
-字</em></span>: </p>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.definitions.c___arithmetic_types"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.c___arithmetic_types" title="C++ Arithmetic Types C++&#31639;&#26415;&#31867;&#22411;">
+      C++ Arithmetic Types C++&#31639;&#26415;&#31867;&#22411;</a>
+</h3></div></div></div>
+<p>
+ The C++ language defines <span class="underline">fundamental types</span> + (&#167;3.9.1). The following subsets of the fundamental types are intended to + represent <span class="emphasis"><em>numbers</em></span>:<br> C++ &#35821;&#35328;&#23450;&#20041;&#20102;&#19968;&#20123; + <span class="underline">&#22522;&#26412;&#31867;&#22411;</span> (&#167;3.9.1)&#12290;&#20197;&#19979;&#26159;&#22522;&#26412;&#31867;&#22411;&#30340;&#19968;&#20010;&#23376;&#38598;&#65292;&#23427;&#20204;&#29992;&#20110;&#34920;&#31034;
+        <span class="emphasis"><em>&#25968;&#23383;</em></span>&#65306;
+      </p>
 <div class="variablelist">
+<p class="title"><b></b></p>
 <dl>
-<dt><span class="term"><span class="underline">signed
-integer types</span> (§3.9.1/2):</span></dt>
-<dt><span class="term"></span><span class="term"><span class="underline">有 符号整数类型</span>
-(§3.9.1/2):</span></dt>
-<dd>
-<p> <code class="computeroutput"><span class="special">{</span><span class="keyword">signed</span> -<span class="keyword">char</span><span class="special">,</span> <span class="keyword">signed</span> -<span class="keyword">short</span> <span class="keyword">int</span><span class="special">,</span> -<span class="keyword">signed</span> <span class="keyword">int</span><span class="special">,</span> -<span class="keyword">signed</span> <span class="keyword">long</span> <span class="keyword">int</span><span class="special">}</span></code> Can be used to
-represent general integer numbers (both negative and positive).<br>
-<code class="computeroutput"><span class="special">{</span><span class="keyword">signed</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">signed</span> -<span class="keyword">short</span> <span class="keyword">int</span><span class="special">,</span> -<span class="keyword">signed</span> <span class="keyword">int</span><span class="special">,</span> -<span class="keyword">signed</span> <span class="keyword">long</span> <span class="keyword">int</span><span class="special">}</span></code>
-可用于表示普通的整数(包括负数和正数)。 </p>
-</dd>
-<dt><span class="term"><span class="underline">unsigned
-integer types</span> (§3.9.1/3):</span></dt>
-<dt><span class="term"></span><span class="term"><span class="underline">无 符号整数类型</span>
-(§3.9.1/3):</span></dt>
-<dd>
-<p> <code class="computeroutput"><span class="special">{</span><span class="keyword">unsigned</span> -<span class="keyword">char</span><span class="special">,</span> <span class="keyword">unsigned</span> -<span class="keyword">short</span> <span class="keyword">int</span><span class="special">,</span> -<span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> -<span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">int</span><span class="special">}</span></code> Can be used to
-represent positive integer numbers with modulo-arithmetic.<br>
-<code class="computeroutput"><span class="special">{</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">,</span> -<span class="keyword">unsigned</span> <span class="keyword">short</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">unsigned</span> -<span class="keyword">int</span><span class="special">,</span> <span class="keyword">unsigned</span> -<span class="keyword">long</span> <span class="keyword">int</span><span class="special">}</span></code>
-可用于表示模算术中的正整数。</p>
-</dd>
+<dt><span class="term"><span class="underline">signed integer
+ types &#26377;&#31526;&#21495;&#25972;&#25968;&#31867;&#22411;</span> (&#167;3.9.1/2):</span></dt>
+<dd><p>
+ <code class="computeroutput"><span class="special">{</span><span class="keyword">signed</span>
+            <span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">signed</span> <span class="keyword">short</span>
+            <span class="keyword">int</span><span class="special">,</span>
+ <span class="keyword">signed</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">signed</span> <span class="keyword">long</span> <span class="keyword">int</span><span class="special">}</span></code> Can be used to represent general integer + numbers (both negative and positive).<br> <code class="computeroutput"><span class="special">{</span><span class="keyword">signed</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">signed</span> <span class="keyword">short</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">signed</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">signed</span> <span class="keyword">long</span> + <span class="keyword">int</span><span class="special">}</span></code> + &#21487;&#29992;&#20110;&#34920;&#31034;&#26222;&#36890;&#30340;&#25972;&#25968;(&#21253;&#25324;&#36127;&#25968;&#21644;&#27491;&#25968;)&#12290;
+          </p></dd>
+<dt><span class="term"><span class="underline">unsigned integer
+ types &#26080;&#31526;&#21495;&#25972;&#25968;&#31867;&#22411;</span> (&#167;3.9.1/3):</span></dt>
+<dd><p>
+ <code class="computeroutput"><span class="special">{</span><span class="keyword">unsigned</span>
+            <span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="keyword">short</span>
+            <span class="keyword">int</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">int</span><span class="special">}</span></code> Can be used to represent positive integer + numbers with modulo-arithmetic.<br> <code class="computeroutput"><span class="special">{</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> + <span class="keyword">int</span><span class="special">}</span></code> + &#21487;&#29992;&#20110;&#34920;&#31034;&#27169;&#31639;&#26415;&#20013;&#30340;&#27491;&#25972;&#25968;&#12290;
+          </p></dd>
 <dt><span class="term"><span class="underline">floating-point
-types</span> (§3.9.1/8):</span></dt>
-<dt><span class="term"></span><span class="term"><span class="underline">浮 点类型</span>
-(§3.9.1/8):</span></dt>
-<dd>
-<p> <code class="computeroutput"><span class="special">{</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">long</span> -<span class="keyword">double</span><span class="special">}</span></code> Can be used to
-represent real numbers.<br>
-<code class="computeroutput"><span class="special">{</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">}</span></code> 可用于表示实数。</p>
-</dd>
-<dt><span class="term"><span class="underline">integral
-or integer types</span> (§3.9.1/7):</span></dt>
-<dt><span class="term"></span><span class="term"><span class="underline">整 型或整数类型</span>
-(§3.9.1/7):</span></dt>
-<dd>
-<p> <code class="computeroutput"><span class="special">{{</span><span class="keyword">signed</span> -<span class="identifier">integers</span><span class="special">},{</span><span class="keyword">unsigned</span> -<span class="identifier">integers</span><span class="special">},</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">char</span> -<span class="keyword">and</span> <span class="keyword">wchar_t</span><span class="special">}</span></code>
-</p>
-</dd>
+ types &#28014;&#28857;&#31867;&#22411;</span> (&#167;3.9.1/8):</span></dt>
+<dd><p>
+ <code class="computeroutput"><span class="special">{</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">}</span></code> + Can be used to represent real numbers.<br> <code class="computeroutput"><span class="special">{</span><span class="keyword">float</span><span class="special">,</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">long</span> <span class="keyword">double</span><span class="special">}</span></code> &#21487;&#29992;&#20110;&#34920;&#31034;&#23454;&#25968;&#12290;
+          </p></dd>
+<dt><span class="term"><span class="underline">integral or
+ integer types &#25972;&#22411;&#25110;&#25972;&#25968;&#31867;&#22411;</span> (&#167;3.9.1/7):</span></dt>
+<dd><p>
+ <code class="computeroutput"><span class="special">{{</span><span class="keyword">signed</span> + <span class="identifier">integers</span><span class="special">},{</span><span class="keyword">unsigned</span> <span class="identifier">integers</span><span class="special">},</span> <span class="keyword">bool</span><span class="special">,</span> <span class="keyword">char</span> <span class="keyword">and</span> <span class="keyword">wchar_t</span><span class="special">}</span></code>
+          </p></dd>
 <dt><span class="term"><span class="underline">arithmetic
-types</span> (§3.9.1/8):</span></dt>
-<dt><span class="term"></span><span class="term"><span class="underline">算 术类型</span>
-(§3.9.1/8):</span></dt>
-<dd>
-<p> <code class="computeroutput"><span class="special">{{</span><span class="identifier">integer</span> -<span class="identifier">types</span><span class="special">},{</span><span class="identifier">floating</span> -<span class="identifier">types</span><span class="special">}}</span></code> </p>
-</dd>
+ types &#31639;&#26415;&#31867;&#22411;</span> (&#167;3.9.1/8):</span></dt>
+<dd><p>
+ <code class="computeroutput"><span class="special">{{</span><span class="identifier">integer</span> + <span class="identifier">types</span><span class="special">},{</span><span class="identifier">floating</span> <span class="identifier">types</span><span class="special">}}</span></code>
+          </p></dd>
 </dl>
 </div>
-<p> The integer types are required to have a <span class="emphasis"><em>binary</em></span>
-value representation.<br>
-整数类型要求具有一个<span class="emphasis"><em>二进制</em></span>的
-值表示法。 </p>
-<p> Additionally, the signed/unsigned integer types of the same
-base type (<code class="computeroutput"><span class="keyword">short</span></code>, <code class="computeroutput"><span class="keyword">int</span></code>
-or <code class="computeroutput"><span class="keyword">long</span></code>)
-are required to have the same value representation, that is:<br>
-另外,相同基本类型(<code class="computeroutput"><span class="keyword">short</span></code>, <code class="computeroutput"><span class="keyword">int</span></code>
-或 <code class="computeroutput"><span class="keyword">long</span></code>)
-的有符号/无符号整数类型要求具有相同的值表示法,即: </p>
-<pre class="programlisting"> <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="special">-</span><span class="number">3</span> <span class="special">;</span> <span class="comment">// suppose value representation is: 10011 (sign bit + 4 magnitude bits)<br> // 假设值表示法 为:</span><span class="comment">10011 (符号位 + 4 数量位)</span><span class="comment"> <br></span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">u</span> <span class="special">=</span> <span class="identifier">i</span> <span class="special">;</span> <span class="comment">// u is required to have the same 10011 as its value representation.<br> // u 被要求具有与 10011 相同的值 表示法<br></span></pre>
-<p> In other words, the integer types signed/unsigned X use the
-same value representation but a different <span class="emphasis"><em>interpretation</em></span>
-of it; that is, their <span class="emphasis"><em>typed
-values</em></span> might differ.<br>
-换言之,整数类型 signed/unsigned X 使用相同的值表示法,但有不同的<span class="emphasis"><em>解
-释</em></span>;即它们的<span class="emphasis"><em>有
-类型值</em></span>可能不同。 </p>
-<p> Another consequence of this is that the range for signed X is
-always a smaller subset of the range of unsigned X, as required by
-§3.9.1/3.<br>
-这一要求的另一个推论是,signed X 的范围总是 unsigned X 的范围的一个小子 集,正如 §3.9.1/3 所要求的。 </p>
-<div class="note">
-<table summary="Note" border="0">
-<tbody>
+<p>
+ The integer types are required to have a <span class="emphasis"><em>binary</em></span> value + representation.<br> &#25972;&#25968;&#31867;&#22411;&#35201;&#27714;&#20855;&#26377;&#19968;&#20010; <span class="emphasis"><em>&#20108;&#36827;&#21046;</em></span>
+        &#30340;&#20540;&#34920;&#31034;&#27861;&#12290;
+      </p>
+<p>
+ Additionally, the signed/unsigned integer types of the same base type (<code class="computeroutput"><span class="keyword">short</span></code>, <code class="computeroutput"><span class="keyword">int</span></code> + or <code class="computeroutput"><span class="keyword">long</span></code>) are required to have + the same value representation, that is:<br> &#21478;&#22806;&#65292;&#30456;&#21516;&#22522;&#26412;&#31867;&#22411;(<code class="computeroutput"><span class="keyword">short</span></code>, <code class="computeroutput"><span class="keyword">int</span></code> + &#25110; <code class="computeroutput"><span class="keyword">long</span></code>) &#30340;&#26377;&#31526;&#21495;/&#26080;&#31526;&#21495;&#25972;&#25968;&#31867;&#22411;&#35201;&#27714;&#20855;&#26377;&#30456;&#21516;&#30340;&#20540;&#34920;&#31034;&#27861;&#65292;&#21363;&#65306;
+      </p>
+<pre class="programlisting"> <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="special">-</span><span class="number">3</span> <span class="special">;</span> <span class="comment">// suppose value representation is: 10011 (sign bit + 4 magnitude bits) +</span> <span class="comment">// &#20551;&#35774;&#20540;&#34920;&#31034;&#27861;&#20026;&#65306;10011 (&#31526;&#21495;&#20301; + 4 &#25968;&#37327;&#20301;) +</span><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">u</span> <span class="special">=</span> <span class="identifier">i</span> <span class="special">;</span> <span class="comment">// u is required to have the same 10011 as its value representation. +</span><span class="comment">// u &#34987;&#35201;&#27714;&#20855;&#26377;&#19982; 10011 &#30456;&#21516;&#30340;&#20540;&#34920;&#31034;&#27861;
+</span></pre>
+<p>
+ In other words, the integer types signed/unsigned X use the same value representation + but a different <span class="emphasis"><em>interpretation</em></span> of it; that is, their + <span class="emphasis"><em>typed values</em></span> might differ.<br> &#25442;&#35328;&#20043;&#65292;&#25972;&#25968;&#31867;&#22411; + signed/unsigned X &#20351;&#29992;&#30456;&#21516;&#30340;&#20540;&#34920;&#31034;&#27861;&#65292;&#20294;&#26377;&#19981;&#21516;&#30340; <span class="emphasis"><em>&#35299;&#37322;</em></span>&#65307;&#21363;&#23427;&#20204;&#30340; + <span class="emphasis"><em>&#26377;&#31867;&#22411;&#20540;</em></span> &#21487;&#33021;&#19981;&#21516;&#12290;
+      </p>
+<p>
+ Another consequence of this is that the range for signed X is always a smaller + subset of the range of unsigned X, as required by &#167;3.9.1/3.<br> &#36825;&#19968;&#35201;&#27714;&#30340;&#21478;&#19968;&#20010;&#25512;&#35770;&#26159;&#65292;signed + X &#30340;&#33539;&#22260;&#24635;&#26159; unsigned X &#30340;&#33539;&#22260;&#30340;&#19968;&#20010;&#23567;&#23376;&#38598;&#65292;&#27491;&#22914; &#167;3.9.1/3
+        &#25152;&#35201;&#27714;&#30340;&#12290;
+      </p>
+<div class="note"><table border="0" summary="Note">
 <tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
-<th align="left">Note 说明</th>
+<th align="left">Note</th>
 </tr>
-<tr>
-<td align="left" valign="top">
-<p> Always remember that unsigned types, unlike signed
-types, have modulo-arithmetic; that is, they do not overflow. This
-means that:</p>
-<p>请记住,无符号类型不象有符号类型,它具有模算术;即它们不会溢出。这意味 着: </p>
-<p> <span class="bold"><strong>-</strong></span>
-Always be extra careful when mixing signed/unsigned types<br>
-<span class="bold"><strong>-</strong></span>
-在混合使用有符号/无符号类型时,一定要额外小心 </p>
-<p> <span class="bold"><strong>-</strong></span>
-Use unsigned types only when you need modulo arithmetic or very very
-large numbers. Don't use unsigned types just because you intend to deal
-with positive values only (you can do this with signed types as well).<br>
-<span class="bold"><strong>-</strong></span>
-仅在你需要模算术或需要很大很大的数字时,才使用无符号类型。不要只是因为你想 处理正整数而使用无符号类型(你可以用有符号类型来处理)。 </p>
-</td>
-</tr>
-</tbody>
-</table>
+<tr><td align="left" valign="top">
+<p>
+ Always remember that unsigned types, unlike signed types, have modulo-arithmetic; + that is, they do not overflow. This means that:<br> &#35831;&#19968;&#23450;&#35760;&#20303;&#65292;&#26080;&#31526;&#21495;&#31867;&#22411;&#19981;&#35937;&#26377;&#31526;&#21495;&#31867;&#22411;&#65292;&#23427;&#20855;&#26377;&#27169;&#31639;&#26415;&#65307;&#21363;&#23427;&#20204;&#19981;&#20250;&#28322;&#20986;&#12290;&#36825;&#24847;&#21619;&#30528;&#65306;
+        </p>
+<p>
+ <span class="bold"><strong>-</strong></span> Always be extra careful when mixing + signed/unsigned types<br> <span class="bold"><strong>-</strong></span> &#22312;&#28151;&#21512;&#20351;&#29992;&#26377;&#31526;&#21495;/&#26080;&#31526;&#21495;&#31867;&#22411;&#26102;&#65292;&#19968;&#23450;&#35201;&#39069;&#22806;&#23567;&#24515;
+        </p>
+<p>
+ <span class="bold"><strong>-</strong></span> Use unsigned types only when you need + modulo arithmetic or very very large numbers. Don't use unsigned types + just because you intend to deal with positive values only (you can do this + with signed types as well).<br> <span class="bold"><strong>-</strong></span> &#20165;&#22312;&#20320;&#38656;&#35201;&#27169;&#31639;&#26415;&#25110;&#38656;&#35201;&#24456;&#22823;&#24456;&#22823;&#30340;&#25968;&#23383;&#26102;&#65292;&#25165;&#20351;&#29992;&#26080;&#31526;&#21495;&#31867;&#22411;&#12290;&#19981;&#35201;&#21482;&#26159;&#22240;&#20026;&#20320;&#24819;&#22788;&#29702;&#27491;&#25972;&#25968;&#32780;&#20351;&#29992;&#26080;&#31526;&#21495;&#31867;&#22411;(&#20320;&#21487;&#20197;&#29992;&#26377;&#31526;&#21495;&#31867;&#22411;&#26469;&#22788;&#29702;)&#12290;
+        </p>
+</td></tr>
+</table></div>
 </div>
-</div>
-<a name="numeric_conversion_definitions_numeric_types"></a>
-<p> </p>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.definitions.numeric_types"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types">Numeric Types 数字类型</a>
-</h3>
-</div>
-</div>
-</div>
-<p> This section introduces the following definitions intended to
-integrate arithmetic types with user-defined types which behave like
-numbers. Some definitions are purposely broad in order to include a
-vast variety of user-defined number types.<br>
-本节介绍以下定义,目的是将算术类型与行为与数字一样的用户自定义类型相集成。 有些定义被故意放宽,以包容大量的用户自定义数字类型。 </p> -<p> Within this library, the term <span class="emphasis"><em>number</em></span>
-refers to an abstract numeric value.<br>
-在本库中,术语 <span class="emphasis"><em>数字</em></span>
-是指一个抽象的数字值。 </p>
-<p> A type is <span class="bold"><strong>numeric</strong></span>
-if:<br>
-一个类型是 <span class="bold"><strong>数字类型</strong></span>,
-如果: </p>
-<div class="itemizedlist">
-<ul type="disc">
-<li> It is an arithmetic type, or,<br>
-它是一个算术类型,或者, </li>
-<li> It is a user-defined type which<br>
-它是一个用户自定义类型,满足
-<div class="itemizedlist">
-<ul type="circle">
-<li> Represents numeric abstract values (i.e.
-numbers).<br>
-它表示了数字抽象值(如多位数字)。 </li>
-<li> Can be converted (either implicitly or explicitly)
-to/from at least one arithmetic type.<br>
-它可以与至少一种算术类型相互转换(隐式或显式)。 </li>
-<li> Has <a class="link" href="definitions.html#numeric_conversion_definitions_range">range</a> -(possibly unbounded) and <a class="link" href="definitions.html#numeric_conversion_definitions_range">precision</a>
-(possibly dynamic or unlimited).<br>
-它具有 <a class="link" href="definitions.html#numeric_conversion_definitions_range">范 -围</a> (可能是无界的)和 <a class="link" href="definitions.html#numeric_conversion_definitions_range">精
-度</a> (可能是动态或无限的)。 </li>
-<li> Provides an specialization of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>.
-<br>
-它提供了对 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>
-的特化。 </li>
-</ul>
-</div>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.definitions.numeric_types"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;"> Numeric
+      Types &#25968;&#23383;&#31867;&#22411;</a>
+</h3></div></div></div>
+<p>
+ This section introduces the following definitions intended to integrate arithmetic + types with user-defined types which behave like numbers. Some definitions + are purposely broad in order to include a vast variety of user-defined number + types.<br> &#26412;&#33410;&#20171;&#32461;&#20197;&#19979;&#23450;&#20041;&#65292;&#30446;&#30340;&#26159;&#23558;&#31639;&#26415;&#31867;&#22411;&#19982;&#34892;&#20026;&#19982;&#25968;&#23383;&#19968;&#26679;&#30340;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#30456;&#38598;&#25104;&#12290;&#26377;&#20123;&#23450;&#20041;&#34987;&#25925;&#24847;&#25918;&#23485;&#65292;&#20197;&#21253;&#23481;&#22823;&#37327;&#30340;&#29992;&#25143;&#33258;&#23450;&#20041;&#25968;&#23383;&#31867;&#22411;&#12290;
+      </p>
+<p>
+ Within this library, the term <span class="emphasis"><em>number</em></span> refers to an abstract + numeric value.<br> &#22312;&#26412;&#24211;&#20013;&#65292;&#26415;&#35821; <span class="emphasis"><em>&#25968;&#23383;</em></span> &#26159;&#25351;&#19968;&#20010;&#25277;&#35937;&#30340;&#25968;&#23383;&#20540;&#12290;
+      </p>
+<p>
+ A type is <span class="bold"><strong>numeric</strong></span> if:<br> &#19968;&#20010;&#31867;&#22411;&#26159; + <span class="emphasis"><em>&#25968;&#23383;&#31867;&#22411;</em></span>&#65292;&#22914;&#26524;&#65306;
+      </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ It is an arithmetic type, or,<br> &#23427;&#26159;&#19968;&#20010;&#31639;&#26415;&#31867;&#22411;&#65292;&#25110;&#32773;&#65292;
+        </li>
+<li>
+ It is a user-defined type which<br> &#23427;&#26159;&#19968;&#20010;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#65292;&#28385;&#36275;
+          <div class="itemizedlist"><ul type="circle">
+<li>
+ Represents numeric abstract values (i.e. numbers).<br> &#23427;&#34920;&#31034;&#20102;&#25968;&#23383;&#25277;&#35937;&#20540;(&#22914;&#22810;&#20301;&#25968;&#23383;)&#12290;
+            </li>
+<li>
+ Can be converted (either implicitly or explicitly) to/from at least + one arithmetic type.<br> &#23427;&#21487;&#20197;&#19982;&#33267;&#23569;&#19968;&#31181;&#31639;&#26415;&#31867;&#22411;&#30456;&#20114;&#36716;&#25442;(&#38544;&#24335;&#25110;&#26174;&#24335;)&#12290;
+            </li>
+<li>
+ Has <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">range</a> + (possibly unbounded) and <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">precision</a> + (possibly dynamic or unlimited).<br> &#23427;&#20855;&#26377; <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">&#33539;&#22260;</a> + (&#21487;&#33021;&#26159;&#26080;&#30028;&#30340;)&#21644; <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">&#31934;&#24230;</a> + (&#21487;&#33021;&#26159;&#21160;&#24577;&#25110;&#26080;&#38480;&#30340;)&#12290;
+            </li>
+<li>
+ Provides an specialization of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>.<br> + &#23427;&#25552;&#20379;&#20102;&#23545; <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>
+              &#30340;&#29305;&#21270;&#12290;
+            </li>
+</ul></div>
 </li>
-</ul>
-</div>
-<p> A numeric type is <span class="bold"><strong>signed</strong></span>
-if the abstract values it represent include negative numbers.<br>
-一个数字类型是 <span class="bold"><strong>有符号的</strong></span>,
-如果它所表示的抽象值包括负数。 </p>
-<p> A numeric type is <span class="bold"><strong>unsigned</strong></span>
-if the abstract values it represent exclude negative numbers.<br>
-一个数字类型是 <span class="bold"><strong>无符号的</strong></span>,
-如果它所表示的抽象值不包括负数。 </p>
-<p> A numeric type is <span class="bold"><strong>modulo</strong></span>
-if it has modulo-arithmetic (does not overflow).<br>
-一个数字类型是 <span class="bold"><strong>带模的</strong></span>,
-如果它具有模算术(不会溢出)。 </p>
-<p> A numeric type is <span class="bold"><strong>integer</strong></span>
-if the abstract values it represent are whole numbers.<br>
-一个数字类型是 <span class="bold"><strong>整型的</strong></span>,
-如果它所表示的抽象值是整数。 </p>
-<p> A numeric type is <span class="bold"><strong>floating</strong></span>
-if the abstract values it represent are real numbers.<br>
-一个数字类型是 <span class="bold"><strong>浮点型的</strong></span>,
-如果它所表示的抽象值是实数。 </p>
-<p> An <span class="bold"><strong>arithmetic
-value</strong></span> is the typed value of an arithmetic
-type<br>
-<span class="bold"><strong>算术值</strong></span>
-是指算术类型的有类型值。 </p>
-<p> A <span class="bold"><strong>numeric value</strong></span>
-is the typed value of a numeric type<br>
-<span class="bold"><strong>数字值</strong></span>
-是指数字类型的有类型值。 </p>
-<p> These definitions simply generalize the standard notions of
-arithmetic types and values by introducing a superset called <span class="underline">numeric</span>. All arithmetic types
-and values are numeric types and values, but not vice versa, since
-user-defined numeric types are not arithmetic types.<br>
-这些定义只是通过引用一个名为 <span class="underline">数字</span>
-的超集,对标准中的算术类型和算术值进行了泛化。所有算术类型和算术值都是数字 类型和数字值,但反之不然,因为用户自定义的数字类型不是算术类型。 </p>
-<p> The following examples clarify the differences between
-arithmetic and numeric types (and values):<br>
-以下例子澄清了算术类型(和算术值)和数字类型(和数字值)间的差异: </p>
-<pre class="programlisting"><span class="comment">// A numeric type which is not an arithmetic type (is user-defined)<br></span><span class="comment">// and which is intended to represent integer numbers (i.e., an 'integer' numeric type)<br>// 一个不是算术类型的数字类型(用户自定 义的),它用于表示整数(即一个'整型'的数字类型)<br></span><span class="keyword">class</span> <span class="identifier">MyInt</span><br><span class="special">{</span><br><span class="identifier">MyInt</span> <span class="special">(</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">v</span> <span class="special">)</span> <span class="special">;</span><br><span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">to_builtin</span><span class="special">();</span><br><span class="special">}</span> <span class="special">;</span><br><span class="keyword">namespace</span> <span class="identifier">std</span> <span class="special">{</span><br><span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">MyInt</span><span class="special">&gt;</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span> <span class="special">;</span><br><span class="special">}</span><br><span class="comment">// A 'floating' numeric type (double) which is also an arithmetic type (built-in),<br></span><span class="comment">// with a float numeric value.<br>// 一个'浮点'的数字类型(double),同时也是算术类型(内建的 ),具有浮点数值。<br></span><span class="keyword">double</span> <span class="identifier">pi</span> <span class="special">=</span> <span class="identifier">M_PI</span> <span class="special">;</span><br><span class="comment">// A 'floating' numeric type with a whole numeric value.<br></span><span class="comment">// NOTE: numeric values are typed valued, hence, they are, for instance,<br></span><span class="comment">// integer or floating, despite the value itself being whole or including<br></span><span class="comment">// a fractional part.<br>// 一个具 有整数值的'浮点'数字类型。注:数字值是有类型值,因此它们是整型的或浮点型 的,<br>// 无论它的值本身是整数的还是带有小数的。<br></span><span class="keyword">double</span> <span class="identifier">two</span> <span class="special">=</span> <span class="number">2.0</span> <span class="special">;</span><br><span class="comment">// An integer numeric type with an integer numeric value.<br>// 一个具有整型数字值的整型数字类型。 <br></span><span class="identifier">MyInt</span> <span class="identifier">i</span><span class="special">(</span><span class="number">1234</span><span class="special">);</span>
+</ul></div>
+<p>
+ A numeric type is <span class="bold"><strong>signed</strong></span> if the abstract + values it represent include negative numbers.<br> &#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#26159; + <span class="bold"><strong>&#26377;&#31526;&#21495;&#30340;</strong></span>&#65292;&#22914;&#26524;&#23427;&#25152;&#34920;&#31034;&#30340;&#25277;&#35937;&#20540;&#21253;&#25324;&#36127;&#25968;&#12290;
+      </p>
+<p>
+ A numeric type is <span class="bold"><strong>unsigned</strong></span> if the abstract + values it represent exclude negative numbers.<br> &#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#26159; + <span class="bold"><strong>&#26080;&#31526;&#21495;&#30340;</strong></span>&#65292;&#22914;&#26524;&#23427;&#25152;&#34920;&#31034;&#30340;&#25277;&#35937;&#20540;&#19981;&#21253;&#25324;&#36127;&#25968;&#12290;
+      </p>
+<p>
+ A numeric type is <span class="bold"><strong>modulo</strong></span> if it has modulo-arithmetic + (does not overflow).<br> &#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#26159; <span class="bold"><strong>&#24102;&#27169;&#30340;</strong></span>&#65292;&#22914;&#26524;&#23427;&#20855;&#26377;&#27169;&#31639;&#26415;(&#19981;&#20250;&#28322;&#20986;)&#12290;
+      </p>
+<p>
+ A numeric type is <span class="bold"><strong>integer</strong></span> if the abstract + values it represent are whole numbers.<br> &#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#26159; <span class="bold"><strong>&#25972;&#22411;&#30340;</strong></span>&#65292;&#22914;&#26524;&#23427;&#25152;&#34920;&#31034;&#30340;&#25277;&#35937;&#20540;&#26159;&#25972;&#25968;&#12290;
+      </p>
+<p>
+ A numeric type is <span class="bold"><strong>floating</strong></span> if the abstract + values it represent are real numbers.<br> &#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#26159; <span class="bold"><strong>&#28014;&#28857;&#22411;&#30340;</strong></span>&#65292;&#22914;&#26524;&#23427;&#25152;&#34920;&#31034;&#30340;&#25277;&#35937;&#20540;&#26159;&#23454;&#25968;&#12290;
+      </p>
+<p>
+ An <span class="bold"><strong>arithmetic value</strong></span> is the typed value of + an arithmetic type<br> <span class="bold"><strong>&#31639;&#26415;&#20540;</strong></span> &#26159;&#25351;&#31639;&#26415;&#31867;&#22411;&#30340;&#26377;&#31867;&#22411;&#20540;&#12290;
+      </p>
+<p>
+ A <span class="bold"><strong>numeric value</strong></span> is the typed value of a + numeric type<br> <span class="bold"><strong>&#25968;&#23383;&#20540;</strong></span> &#26159;&#25351;&#25968;&#23383;&#31867;&#22411;&#30340;&#26377;&#31867;&#22411;&#20540;&#12290;
+      </p>
+<p>
+ These definitions simply generalize the standard notions of arithmetic types + and values by introducing a superset called <span class="underline">numeric</span>. + All arithmetic types and values are numeric types and values, but not vice + versa, since user-defined numeric types are not arithmetic types.<br> &#36825;&#20123;&#23450;&#20041;&#21482;&#26159;&#36890;&#36807;&#24341;&#29992;&#19968;&#20010;&#21517;&#20026; + <span class="underline">&#25968;&#23383;</span> &#30340;&#36229;&#38598;&#65292;&#23545;&#26631;&#20934;&#20013;&#30340;&#31639;&#26415;&#31867;&#22411;&#21644;&#31639;&#26415;&#20540;&#36827;&#34892;&#20102;&#27867;&#21270;&#12290; + &#25152;&#26377;&#31639;&#26415;&#31867;&#22411;&#21644;&#31639;&#26415;&#20540;&#37117;&#26159;&#25968;&#23383;&#31867;&#22411;&#21644;&#25968;&#23383;&#20540;&#65292;&#20294;&#21453;&#20043;&#19981;&#28982;&#65292;&#22240;&#20026;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#25968;&#23383;&#31867;&#22411;&#19981;&#26159;&#31639;&#26415;&#31867;&#22411;&#12290;
+      </p>
+<p>
+ The following examples clarify the differences between arithmetic and numeric + types (and values):<br> &#20197;&#19979;&#20363;&#23376;&#35828;&#26126;&#20102;&#31639;&#26415;&#31867;&#22411;(&#21644;&#31639;&#26415;&#20540;)&#21644;&#25968;&#23383;&#31867;&#22411;(&#21644;&#25968;&#23383;&#20540;)&#38388;&#30340;&#24046;&#24322;&#65306;
+      </p>
+<pre class="programlisting"><span class="comment">// A numeric type which is not an arithmetic type (is user-defined) +</span><span class="comment">// and which is intended to represent integer numbers (i.e., an 'integer' numeric type) +</span><span class="comment">// &#19968;&#20010;&#19981;&#26159;&#31639;&#26415;&#31867;&#22411;&#30340;&#25968;&#23383;&#31867;&#22411;(&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;)&#65292;&#23427;&#29992;&#20110;&#34920;&#31034;&#25972;&#25968;(&#21363;&#19968;&#20010;'&#25972;&#22411;'&#30340;&#25968;&#23383;&#31867;&#22411;) +</span><span class="keyword">class</span> <span class="identifier">MyInt</span>
+<span class="special">{</span>
+ <span class="identifier">MyInt</span> <span class="special">(</span> <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">v</span> <span class="special">)</span> <span class="special">;</span> + <span class="keyword">long</span> <span class="keyword">long</span> <span class="identifier">to_builtin</span><span class="special">();</span>
+<span class="special">}</span> <span class="special">;</span>
+<span class="keyword">namespace</span> <span class="identifier">std</span> <span class="special">{</span> +<span class="keyword">template</span><span class="special">&lt;&gt;</span> <span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">MyInt</span><span class="special">&gt;</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span> <span class="special">;</span>
+<span class="special">}</span>
+
+<span class="comment">// A 'floating' numeric type (double) which is also an arithmetic type (built-in),
+</span><span class="comment">// with a float numeric value.
+</span><span class="comment">// &#19968;&#20010;'&#28014;&#28857;'&#30340;&#25968;&#23383;&#31867;&#22411;(double)&#65292;&#21516;&#26102;&#20063;&#26159;&#31639;&#26415;&#31867;&#22411;(&#20869;&#24314;&#30340;)&#65292;&#20855;&#26377;&#28014;&#28857;&#25968;&#20540;&#12290; +</span><span class="keyword">double</span> <span class="identifier">pi</span> <span class="special">=</span> <span class="identifier">M_PI</span> <span class="special">;</span>
+
+<span class="comment">// A 'floating' numeric type with a whole numeric value. +</span><span class="comment">// NOTE: numeric values are typed valued, hence, they are, for instance, +</span><span class="comment">// integer or floating, despite the value itself being whole or including
+</span><span class="comment">// a fractional part.
+</span><span class="comment">// &#19968;&#20010;&#20855;&#26377;&#25972;&#25968;&#20540;&#30340;'&#28014;&#28857;'&#25968;&#23383;&#31867;&#22411;&#12290;&#27880;&#65306;&#25968;&#23383;&#20540;&#26159;&#26377;&#31867;&#22411;&#20540;&#65292;&#22240;&#27492;&#23427;&#20204;&#26159;&#25972;&#22411;&#30340;&#25110;&#28014;&#28857;&#22411;&#30340;&#65292; +</span><span class="comment">// &#26080;&#35770;&#23427;&#30340;&#20540;&#26412;&#36523;&#26159;&#25972;&#25968;&#30340;&#36824;&#26159;&#24102;&#26377;&#23567;&#25968;&#30340;&#12290; +</span><span class="keyword">double</span> <span class="identifier">two</span> <span class="special">=</span> <span class="number">2.0</span> <span class="special">;</span>
+
+<span class="comment">// An integer numeric type with an integer numeric value. +</span><span class="comment">// &#19968;&#20010;&#20855;&#26377;&#25972;&#22411;&#25968;&#23383;&#20540;&#30340;&#25972;&#22411;&#25968;&#23383;&#31867;&#22411;&#12290; +</span><span class="identifier">MyInt</span> <span class="identifier">i</span><span class="special">(</span><span class="number">1234</span><span class="special">);</span>
 </pre>
 </div>
-<a name="numeric_conversion_definitions_range"></a>
-<p> </p>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.definitions.range_and_precision"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision">Range and Precision 范围与精度</a>
-</h3>
-</div>
-</div>
-</div>
-<p> Given a number set <code class="computeroutput"><span class="identifier">N</span></code>, some of its -elements are representable in a numeric type <code class="computeroutput"><span class="identifier">T</span></code>.<br> -给定一个数字集合 <code class="computeroutput"><span class="identifier">N</span></code>,它的一些元素可以在数字类型
-<code class="computeroutput"><span class="identifier">T</span></code>
-中表示。
-</p>
-<p> The set of representable values of type <code class="computeroutput"><span class="identifier">T</span></code>, -or numeric set of <code class="computeroutput"><span class="identifier">T</span></code>, is a set of -numeric values whose elements are the representation of some subset of <code class="computeroutput"><span class="identifier">N</span></code>.<br> -类型 <code class="computeroutput"><span class="identifier">T</span></code> 可表示的值的集合,或者说 <code class="computeroutput"><span class="identifier">T</span></code> -的数字集合,是指一个数字值的集合,其中的元素是 <code class="computeroutput"><span class="identifier">N</span></code> 的某个子集的 表示法。
-</p>
-<p> For example, the interval of <code class="computeroutput"><span class="keyword">int</span></code> values <code class="computeroutput"><span class="special">[</span><span class="identifier">INT_MIN</span><span class="special">,</span><span class="identifier">INT_MAX</span><span class="special">]</span></code> is the set of -representable values of type <code class="computeroutput"><span class="keyword">int</span></code>, i.e. the <code class="computeroutput"><span class="keyword">int</span></code>
-numeric set, and corresponds to the representation of the elements of
-the interval of abstract values <code class="computeroutput"><span class="special">[</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MIN</span><span class="special">),</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MAX</span><span class="special">)]</span></code> from the
-integer numbers.<br>
-例如,<code class="computeroutput"><span class="keyword">int</span></code>
-值区间 <code class="computeroutput"><span class="special">[</span><span class="identifier">INT_MIN</span><span class="special">,</span><span class="identifier">INT_MAX</span><span class="special">]</span></code> 就是 类型 <code class="computeroutput"><span class="keyword">int</span></code> -的可表示值的集合,也就是 <code class="computeroutput"><span class="keyword">int</span></code> -数字集合,它对应于来自于整数抽象值区间 <code class="computeroutput"><span class="special">[</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MIN</span><span class="special">),</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MAX</span><span class="special">)]</span></code> 的各元素的表示法。 </p> -<p> Similarly, the interval of <code class="computeroutput"><span class="keyword">double</span></code> values <code class="computeroutput"><span class="special">[-</span><span class="identifier">DBL_MAX</span><span class="special">,</span><span class="identifier">DBL_MAX</span><span class="special">]</span></code> is the <code class="computeroutput"><span class="keyword">double</span></code> -numeric set, which corresponds to the subset of the real numbers from <code class="computeroutput"><span class="identifier">abt</span><span class="special">(-</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code> to <code class="computeroutput"><span class="identifier">abt</span><span class="special">(</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code>.<br> -类似地,<code class="computeroutput"><span class="keyword">double</span></code> -值区间 <code class="computeroutput"><span class="special">[-</span><span class="identifier">DBL_MAX</span><span class="special">,</span><span class="identifier">DBL_MAX</span><span class="special">]</span></code> 是 <code class="computeroutput"><span class="keyword">double</span></code> -数字集合,它对应于从 <code class="computeroutput"><span class="identifier">abt</span><span class="special">(-</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code> 到 <code class="computeroutput"><span class="identifier">abt</span><span class="special">(</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code> 的实数的一个子集。 </p> -<p> <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span> </p> -<p> Let <span class="bold"><strong><code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span>
-denote the lowest numeric value greater than x.<br>
-用&nbsp;<span class="bold"><strong><code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span>
-表示大于 x 的最小数字值。 </p>
-<p> Let <span class="bold"><strong><code class="computeroutput"><span class="identifier">prev</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span>
-denote the highest numeric value lower then x.<br>
-用 <span class="bold"><strong><code class="computeroutput"><span class="identifier">prev</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span>
-表示小于 x 的最大数字值。 </p>
-<p> Let <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> -and <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> -be identities that relate a numeric typed value <code class="computeroutput"><span class="identifier">v</span></code> -with a number <code class="computeroutput"><span class="identifier">V</span></code>.<br> -令 <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> -和 <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> -是相同的,将一个数字类型值 <code class="computeroutput"><span class="identifier">v</span></code> -与一个数字 <code class="computeroutput"><span class="identifier">V</span></code>&nbsp;关联起来。
-</p>
-<p> An ordered pair of numeric values <code class="computeroutput"><span class="identifier">x</span></code>,<code class="computeroutput"><span class="identifier">y</span></code> -s.t. <code class="computeroutput"><span class="identifier">x</span><span class="special">&lt;</span><span class="identifier">y</span></code> are <span class="bold"><strong>consecutive</strong></span> -iff <code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)==</span><span class="identifier">y</span></code>.<br> -一个有序的数字值对 <code class="computeroutput"><span class="identifier">x</span></code>,<code class="computeroutput"><span class="identifier">y</span></code> -s.t. <code class="computeroutput"><span class="identifier">x</span><span class="special">&lt;</span><span class="identifier">y</span></code> 是 <span class="bold"><strong>连续的</strong></span> -当且令当 <code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)==</span><span class="identifier">y</span></code>. </p>
-<p> The abstract distance between consecutive numeric values is
-usually referred to as a <span class="underline">Unit in
-the Last Place</span>, or <span class="bold"><strong>ulp</strong></span>
-for short. A ulp is a quantity whose abstract magnitude is relative to
-the numeric values it corresponds to: If the numeric set is not evenly
-distributed, that is, if the abstract distance between consecutive
-numeric values varies along the set -as is the case with the
-floating-point types-, the magnitude of 1ulp after the numeric value <code class="computeroutput"><span class="identifier">x</span></code>
-might be (usually is) different from the magnitude of a 1ulp after the
-numeric value y for <code class="computeroutput"><span class="identifier">x</span><span class="special">!=</span><span class="identifier">y</span></code>.<br> -两个连续数字值之间的抽象距离通常被称为 <span class="underline">最小单元 </span>,
-或简称 <span class="bold"><strong>ulp</strong></span>。ulp
-是一个与相应数字值相关的抽象量:如果这个数字集合不是均匀分布的,即在集合中 的两个连续数字值之间的抽象距离是变化的 --就象浮点类型那样-,那么在数字值 <code class="computeroutput"><span class="identifier">x</span></code> -之后的1个ulp可能会(通常就是)不同于另一个数字值 y 之后的1个ulp,如果 <code class="computeroutput"><span class="identifier">x</span><span class="special">!=</span><span class="identifier">y</span></code>。
-</p>
-<p> Since numbers are inherently ordered, a <span class="bold"><strong>numeric -set</strong></span> of type <code class="computeroutput"><span class="identifier">T</span></code> is an ordered -sequence of numeric values (of type <code class="computeroutput"><span class="identifier">T</span></code>) of the form:<br> -因为数字是有序的,所以类型 <code class="computeroutput"><span class="identifier">T</span></code> 的 <span class="bold"><strong>数字集合 </strong></span> -就是一组数字值(类型为 <code class="computeroutput"><span class="identifier">T</span></code>)的有序排列,形如:
-</p>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.definitions.range_and_precision"></a><a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">
+      Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;</a>
+</h3></div></div></div>
+<p>
+ Given a number set <code class="computeroutput"><span class="identifier">N</span></code>, some + of its elements are representable in a numeric type <code class="computeroutput"><span class="identifier">T</span></code>.<br> + &#32473;&#23450;&#19968;&#20010;&#25968;&#23383;&#38598;&#21512; <code class="computeroutput"><span class="identifier">N</span></code>&#65292;&#23427;&#30340;&#19968;&#20123;&#20803;&#32032;&#21487;&#20197;&#22312;&#25968;&#23383;&#31867;&#22411; + <code class="computeroutput"><span class="identifier">T</span></code> &#20013;&#34920;&#31034;&#12290;
+      </p>
+<p>
+ The set of representable values of type <code class="computeroutput"><span class="identifier">T</span></code>, + or numeric set of <code class="computeroutput"><span class="identifier">T</span></code>, is a + set of numeric values whose elements are the representation of some subset + of <code class="computeroutput"><span class="identifier">N</span></code>.<br> &#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#21487;&#34920;&#31034;&#30340;&#20540;&#30340;&#38598;&#21512;&#65292;&#25110;&#32773;&#35828; + <code class="computeroutput"><span class="identifier">T</span></code> &#30340;&#25968;&#23383;&#38598;&#21512;&#65292;&#26159;&#25351;&#19968;&#20010;&#25968;&#23383;&#20540;&#30340;&#38598;&#21512;&#65292;&#20854;&#20013;&#30340;&#20803;&#32032;&#26159; + <code class="computeroutput"><span class="identifier">N</span></code> &#30340;&#26576;&#20010;&#23376;&#38598;&#30340;&#34920;&#31034;&#27861;&#12290;
+      </p>
+<p>
+ For example, the interval of <code class="computeroutput"><span class="keyword">int</span></code> + values <code class="computeroutput"><span class="special">[</span><span class="identifier">INT_MIN</span><span class="special">,</span><span class="identifier">INT_MAX</span><span class="special">]</span></code> is the set of representable values of type + <code class="computeroutput"><span class="keyword">int</span></code>, i.e. the <code class="computeroutput"><span class="keyword">int</span></code> numeric set, and corresponds to the representation + of the elements of the interval of abstract values <code class="computeroutput"><span class="special">[</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MIN</span><span class="special">),</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MAX</span><span class="special">)]</span></code> + from the integer numbers.<br> &#20363;&#22914;&#65292;<code class="computeroutput"><span class="keyword">int</span></code> + &#20540;&#21306;&#38388; <code class="computeroutput"><span class="special">[</span><span class="identifier">INT_MIN</span><span class="special">,</span><span class="identifier">INT_MAX</span><span class="special">]</span></code> &#23601;&#26159;&#31867;&#22411; <code class="computeroutput"><span class="keyword">int</span></code> + &#30340;&#21487;&#34920;&#31034;&#20540;&#30340;&#38598;&#21512;&#65292;&#20063;&#23601;&#26159; <code class="computeroutput"><span class="keyword">int</span></code> + &#25968;&#23383;&#38598;&#21512;&#65292; &#23427;&#23545;&#24212;&#20110;&#26469;&#33258;&#20110;&#25972;&#25968;&#25277;&#35937;&#20540;&#21306;&#38388; <code class="computeroutput"><span class="special">[</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MIN</span><span class="special">),</span><span class="identifier">abt</span><span class="special">(</span><span class="identifier">INT_MAX</span><span class="special">)]</span></code> &#30340;&#21508;&#20803;&#32032;&#30340;&#34920;&#31034;&#27861;&#12290;
+      </p>
+<p>
+ Similarly, the interval of <code class="computeroutput"><span class="keyword">double</span></code> + values <code class="computeroutput"><span class="special">[-</span><span class="identifier">DBL_MAX</span><span class="special">,</span><span class="identifier">DBL_MAX</span><span class="special">]</span></code> is the <code class="computeroutput"><span class="keyword">double</span></code> + numeric set, which corresponds to the subset of the real numbers from <code class="computeroutput"><span class="identifier">abt</span><span class="special">(-</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code> to <code class="computeroutput"><span class="identifier">abt</span><span class="special">(</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code>.<br> &#31867;&#20284;&#22320;&#65292;<code class="computeroutput"><span class="keyword">double</span></code> + &#20540;&#21306;&#38388; <code class="computeroutput"><span class="special">[-</span><span class="identifier">DBL_MAX</span><span class="special">,</span><span class="identifier">DBL_MAX</span><span class="special">]</span></code> &#26159; <code class="computeroutput"><span class="keyword">double</span></code> + &#25968;&#23383;&#38598;&#21512;&#65292;&#23427;&#23545;&#24212;&#20110;&#20174; <code class="computeroutput"><span class="identifier">abt</span><span class="special">(-</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code> &#21040; <code class="computeroutput"><span class="identifier">abt</span><span class="special">(</span><span class="identifier">DBL_MAX</span><span class="special">)</span></code> &#30340;&#23454;&#25968;&#30340;&#19968;&#20010;&#23376;&#38598;&#12290;
+      </p>
+<p>
+ <span class="inlinemediaobject"><img src="../images/space.png" alt="space"></span>
+      </p>
+<p>
+ Let <span class="bold"><strong><code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span> + denote the lowest numeric value greater than x.<br> &#29992; <span class="bold"><strong><code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span> &#34920;&#31034;&#22823;&#20110; x &#30340;&#26368;&#23567;&#25968;&#23383;&#20540;&#12290;
+      </p>
+<p>
+ Let <span class="bold"><strong><code class="computeroutput"><span class="identifier">prev</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span> + denote the highest numeric value lower then x.<br> &#29992; <span class="bold"><strong><code class="computeroutput"><span class="identifier">prev</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></strong></span> &#34920;&#31034;&#23567;&#20110; x &#30340;&#26368;&#22823;&#25968;&#23383;&#20540;&#12290;
+      </p>
+<p>
+ Let <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> and <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> + be identities that relate a numeric typed value <code class="computeroutput"><span class="identifier">v</span></code> + with a number <code class="computeroutput"><span class="identifier">V</span></code>.<br> &#20196; + <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> + &#21644; <span class="bold"><strong><code class="computeroutput"><span class="identifier">v</span><span class="special">=</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">V</span><span class="special">))</span></code></strong></span> &#26159;&#30456;&#21516;&#30340;&#65292;&#23558;&#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#20540; + <code class="computeroutput"><span class="identifier">v</span></code> &#19982;&#19968;&#20010;&#25968;&#23383; <code class="computeroutput"><span class="identifier">V</span></code> &#20851;&#32852;&#36215;&#26469;&#12290;
+      </p>
+<p>
+ An ordered pair of numeric values <code class="computeroutput"><span class="identifier">x</span></code>,<code class="computeroutput"><span class="identifier">y</span></code> s.t. <code class="computeroutput"><span class="identifier">x</span><span class="special">&lt;</span><span class="identifier">y</span></code> are + <span class="bold"><strong>consecutive</strong></span> iff <code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)==</span><span class="identifier">y</span></code>.<br> &#19968;&#20010;&#26377;&#24207;&#30340;&#25968;&#23383;&#20540;&#23545; <code class="computeroutput"><span class="identifier">x</span></code>,<code class="computeroutput"><span class="identifier">y</span></code> + s.t. <code class="computeroutput"><span class="identifier">x</span><span class="special">&lt;</span><span class="identifier">y</span></code> &#26159; <span class="bold"><strong>&#36830;&#32493;&#30340;</strong></span> + &#24403;&#19988;&#20165;&#24403; <code class="computeroutput"><span class="identifier">next</span><span class="special">(</span><span class="identifier">x</span><span class="special">)==</span><span class="identifier">y</span></code>.
+      </p>
+<p>
+ The abstract distance between consecutive numeric values is usually referred
+        to as a <span class="underline">Unit in the Last Place</span>, or
+ <span class="bold"><strong>ulp</strong></span> for short. A ulp is a quantity whose + abstract magnitude is relative to the numeric values it corresponds to: If + the numeric set is not evenly distributed, that is, if the abstract distance + between consecutive numeric values varies along the set -as is the case with + the floating-point types-, the magnitude of 1ulp after the numeric value + <code class="computeroutput"><span class="identifier">x</span></code> might be (usually is) different + from the magnitude of a 1ulp after the numeric value y for <code class="computeroutput"><span class="identifier">x</span><span class="special">!=</span><span class="identifier">y</span></code>.<br> + &#20004;&#20010;&#36830;&#32493;&#25968;&#23383;&#20540;&#20043;&#38388;&#30340;&#25277;&#35937;&#36317;&#31163;&#36890;&#24120;&#34987;&#31216;&#20026; <span class="underline">&#26368;&#23567;&#21333;&#20803;</span>&#65292;&#25110;&#31616;&#31216; + <span class="bold"><strong>ulp</strong></span>&#12290;ulp &#26159;&#19968;&#20010;&#19982;&#30456;&#24212;&#25968;&#23383;&#20540;&#30456;&#20851;&#30340;&#25277;&#35937;&#37327;&#65306; + &#22914;&#26524;&#36825;&#20010;&#25968;&#23383;&#38598;&#21512;&#19981;&#26159;&#22343;&#21248;&#20998;&#24067;&#30340;&#65292;&#21363;&#22312;&#38598;&#21512;&#20013;&#30340;&#20004;&#20010;&#36830;&#32493;&#25968;&#23383;&#20540;&#20043;&#38388;&#30340;&#25277;&#35937;&#36317;&#31163;&#26159;&#21464;&#21270;&#30340; + -&#23601;&#35937;&#28014;&#28857;&#31867;&#22411;&#37027;&#26679;-&#65292; &#37027;&#20040;&#22312;&#25968;&#23383;&#20540; <code class="computeroutput"><span class="identifier">x</span></code> + &#20043;&#21518;&#30340;1&#20010;ulp&#21487;&#33021;&#20250;(&#36890;&#24120;&#37117;&#20250;)&#19981;&#21516;&#20110;&#21478;&#19968;&#20010;&#25968;&#23383;&#20540; <code class="computeroutput"><span class="identifier">y</span></code> &#20043;&#21518;&#30340;1&#20010;ulp&#65292;&#22914;&#26524; <code class="computeroutput"><span class="identifier">x</span><span class="special">!=</span><span class="identifier">y</span></code>&#12290;
+      </p>
+<p>
+ Since numbers are inherently ordered, a <span class="bold"><strong>numeric set</strong></span> + of type <code class="computeroutput"><span class="identifier">T</span></code> is an ordered sequence + of numeric values (of type <code class="computeroutput"><span class="identifier">T</span></code>) + of the form:<br> &#22240;&#20026;&#25968;&#23383;&#26159;&#26377;&#24207;&#30340;&#65292;&#25152;&#20197;&#31867;&#22411; <code class="computeroutput"><span class="identifier">T</span></code> &#30340; <span class="bold"><strong>&#25968;&#23383;&#38598;&#21512;</strong></span> + &#23601;&#26159;&#19968;&#32452;&#25968;&#23383;&#20540;(&#31867;&#22411;&#20026; <code class="computeroutput"><span class="identifier">T</span></code>)&#30340;&#26377;&#24207;&#25490;&#21015;&#65292;&#24418;&#22914;&#65306;
+      </p>
<pre class="programlisting"><span class="identifier">REP</span><span class="special">(</span><span class="identifier">T</span><span class="special">)={</span><span class="identifier">l</span><span class="special">,</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">l</span><span class="special">),</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">next</span><span class="special">(</span><span class="identifier">l</span><span class="special">)),...,</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">h</span><span class="special">)),</span><span class="identifier">prev</span><span class="special">(</span><span class="identifier">h</span><span class="special">),</span><span class="identifier">h</span><span class="special">}</span>
 </pre>
-<p> where <code class="computeroutput"><span class="identifier">l</span></code> and <code class="computeroutput"><span class="identifier">h</span></code> -are respectively the lowest and highest values of type <code class="computeroutput"><span class="identifier">T</span></code>, -called the boundary values of type <code class="computeroutput"><span class="identifier">T</span></code>.<br>
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/improved_numeric_cast__.html Mon Mar 22 20:44:11 2010
@@ -1,154 +1,200 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Improved numeric_cast&lt;&gt;</title>
-
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Improved numeric_cast&lt;&gt; &#25913;&#36827;&#30340;numeric_cast&lt;&gt;</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="prev" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes"> -<link rel="next" href="../numeric_conversion/history_and_acknowledgments.html" title="History and Acknowledgments"> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;"> +<link rel="next" href="../numeric_conversion/history_and_acknowledgments.html" title="History and Acknowledgments &#21382;&#21490;&#21644;&#40483;&#35874;">
 </head>
-<body style="color: black; background-color: white;" alink="#0000ff" link="#0000ff" vlink="#840084">
-<table cellpadding="2" width="100%">
-<tbody>
-<tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr>
-</tbody>
-</table>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="numeric_converter_policy_classes.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../numeric_conversion/history_and_acknowledgments.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a></div>
-<div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both;"><a name="boost_numericconversion.improved_numeric_cast__"></a><a class="link" href="improved_numeric_cast__.html" title="Improved numeric_cast&lt;&gt;">Improved
-numeric_cast&lt;&gt; 改进的 numeric_cast&lt;&gt;</a>
-</h2>
+<div class="spirit-nav">
+<a accesskey="p" href="numeric_converter_policy_classes.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../numeric_conversion/history_and_acknowledgments.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</div>
-</div>
-<div class="toc">
-<dl>
-<dt><span class="section"><a href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.introduction">Introduction
-简介</a></span></dt>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_numericconversion.improved_numeric_cast__"></a><a class="link" href="improved_numeric_cast__.html" title="Improved numeric_cast&lt;&gt; &#25913;&#36827;&#30340;numeric_cast&lt;&gt;"> Improved
+    numeric_cast&lt;&gt; &#25913;&#36827;&#30340;numeric_cast&lt;&gt;</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.introduction">
+      Introduction &#31616;&#20171;</a></span></dt>
<dt><span class="section"><a href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.numeric_cast">numeric_cast</a></span></dt> -<dt><span class="section"><a href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.examples">Examples
-例子</a></span></dt>
-</dl>
-</div>
+<dt><span class="section"><a href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.examples">
+      Examples &#20363;&#23376;</a></span></dt>
+</dl></div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.improved_numeric_cast__.introduction"></a><a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.introduction" title="Introduction">Introduction 简介</a>
-</h3>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.improved_numeric_cast__.introduction"></a><a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.introduction" title="Introduction &#31616;&#20171;">
+      Introduction &#31616;&#20171;</a>
+</h3></div></div></div>
+<p>
+ The lack of preservation of range makes conversions between numeric types + error prone. This is true for both implicit conversions and explicit conversions + (through <code class="computeroutput"><span class="keyword">static_cast</span></code>). <a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.numeric_cast" title="numeric_cast"><code class="computeroutput"><span class="identifier">numeric_cast</span></code></a> detects loss of range + when a numeric type is converted, and throws an exception if the range cannot + be preserved.<br> &#30001;&#20110;&#32570;&#20047;&#23545;&#33539;&#22260;&#30340;&#20445;&#25252;&#65292;&#25152;&#20197;&#25968;&#23383;&#31867;&#22411;&#38388;&#30340;&#36716;&#25442;&#24456;&#23481;&#26131;&#20986;&#38169;&#12290;&#36825;&#23545;&#20110;&#38544;&#24335;&#36716;&#25442;&#21644;&#26174;&#24335;&#36716;&#25442;(&#36890;&#36807; + <code class="computeroutput"><span class="keyword">static_cast</span></code>) &#37117;&#26159;&#19968;&#26679;&#30340;&#12290; + <a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.numeric_cast" title="numeric_cast"><code class="computeroutput"><span class="identifier">numeric_cast</span></code></a> &#21487;&#20197;&#22312;&#36716;&#25442;&#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#26102;&#26816;&#26597;&#33539;&#22260;&#30340;&#25439;&#22833;&#65292;&#22914;&#26524;&#33539;&#22260;&#19981;&#33021;&#34987;&#20445;&#25345;&#23601;&#25243;&#20986;&#19968;&#20010;&#24322;&#24120;&#12290;
+      </p>
+<p>
+ There are several situations where conversions are unsafe:<br> &#24403;&#36716;&#25442;&#26159;&#19981;&#23433;&#20840;&#30340;&#26102;&#20505;&#65292;&#26377;&#20197;&#19979;&#20960;&#21508;&#31181;&#24773;&#20917;&#65306;
+      </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Conversions from an integral type with a wider range than the target integral + type.<br> &#20174;&#19968;&#20010;&#27604;&#30446;&#26631;&#31867;&#22411;&#33539;&#22260;&#26356;&#23485;&#30340;&#25972;&#22411;&#31867;&#22411;&#36827;&#34892;&#36716;&#25442;&#12290;
+        </li>
+<li>
+ Conversions from unsigned to signed (and vice versa) integral types.<br> + &#20174;&#26080;&#31526;&#21495;&#25972;&#22411;&#21040;&#26377;&#31526;&#21495;&#25972;&#22411;(&#20197;&#21450;&#30456;&#21453;&#26041;&#21521;)&#30340;&#36716;&#25442;&#12290;
+        </li>
+<li>
+ Conversions from floating point types to integral types.<br> &#20174;&#28014;&#28857;&#31867;&#22411;&#21040;&#25972;&#22411;&#31867;&#22411;&#30340;&#36716;&#25442;&#12290;
+        </li>
+</ul></div>
+<p>
+ The C++ Standard does not specify the behavior when a numeric type is assigned + a value that cannot be represented by the type, except for unsigned integral + types [3.9.1.4], which must obey the laws of arithmetic modulo 2n (this implies + that the result will be reduced modulo the number that is one greater than + the largest value that can be represented). The fact that the behavior for + overflow is undefined for all conversions (except the aforementioned unsigned + to unsigned) makes any code that may produce positive or negative overflows + exposed to portability issues.<br> C+ +&#26631;&#20934;&#27809;&#26377;&#35268;&#23450;&#24403;&#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#34987;&#36171;&#20104;&#19968;&#20010;&#35813;&#31867;&#22411;&#19981;&#33021;&#34920;&#31034;&#30340;&#20540;&#26102;&#30340;&#34892;&#20026;&#65292;&#38500;&#20102;&#26080;&#31526;&#21495;&#25972;&#25968;&#31867;&#22411;&#20197;&#22806;[3.9.1.4]&#65292; + &#21518;&#32773;&#24517;&#39035;&#36981;&#23432;&#27169;2n&#31639;&#26415;&#30340;&#27861;&#21017;(&#36825;&#24847;&#21619;&#30528;&#32467;&#26524;&#20250;&#23558;&#22823;&#20110;&#21487;&#34920;&#31034;&#30340;&#26368;&#22823;&#20540;&#30340;&#25968;&#36827;&#34892;&#21462;&#27169;&#38477;&#20540;)&#12290; + &#20107;&#23454;&#19978;&#65292;&#23545;&#20110;&#25152;&#26377;&#36716;&#25442;(&#38500;&#20102;&#19978;&#36848;&#30340;&#26080;&#31526;&#21495;&#33267;&#26080;&#31526;&#21495;&#30340;&#36716;&#25442;)&#65292;&#28322;&#20986;&#30340;&#34892;&#20026;&#26159;&#26410;&#23450;&#20041;&#30340;&#65292; + &#36825;&#20351;&#24471;&#20219;&#20309;&#21487;&#33021;&#20135;&#29983;&#27491;&#25110;&#36127;&#30340;&#28322;&#20986;&#30340;&#20195;&#30721;&#37117;&#23384;&#22312;&#21487;&#31227;&#26893;&#24615;&#30340;&#38382;&#39064;&#12290;
+      </p>
+<p>
+ <code class="computeroutput"><span class="identifier">numeric_cast</span></code> adheres to the + rules for implicit conversions mandated by the C++ Standard, such as truncating + floating point types when converting to integral types. The implementation + must guarantee that for a conversion to a type that can hold all possible + values of the source type, there will be no runtime overhead.<br> <code class="computeroutput"><span class="identifier">numeric_cast</span></code> &#36981;&#23432;C++&#26631;&#20934;&#25152;&#21046;&#23450;&#30340;&#38544;&#24335;&#36716;&#25442;&#35268;&#21017;&#65292;&#20363;&#22914;&#23558;&#28014;&#28857;&#31867;&#22411;&#36716;&#25442;&#20026;&#25972;&#22411;&#31867;&#22411;&#26102;&#36827;&#34892;&#25130;&#26029;&#12290; + &#20854;&#23454;&#29616;&#24517;&#39035;&#20445;&#35777;&#23545;&#20110;&#21040;&#19968;&#20010;&#31867;&#22411;&#30340;&#36716;&#25442;&#65292;&#21487;&#20197;&#20445;&#25345;&#28304;&#31867;&#22411;&#30340;&#25152;&#26377;&#21487;&#33021;&#20540;&#65292;&#19988;&#27809;&#26377;&#36816;&#34892;&#26399;&#24320;&#38144;&#12290;
+      </p>
 </div>
-</div>
-</div>
-<p> The lack of preservation of range makes conversions between
-numeric types error prone. This is true for both implicit conversions
-and explicit conversions (through <code class="computeroutput"><span class="keyword">static_cast</span></code>). <a class="link" href="improved_numeric_cast__.html#numeric_conversion_numeric_cast"><code class="computeroutput"><span class="identifier">numeric_cast</span></code></a>
-detects loss of range when a numeric type is converted, and throws an
-exception if the range cannot be preserved.<br>
-由于缺乏对范围的保护,所以数字类型间的转换很容易出错。这对于隐式转换和显式 转换(通过 <code class="computeroutput"><span class="keyword">static_cast</span></code>) -都是一样的。<a class="link" href="improved_numeric_cast__.html#numeric_conversion_numeric_cast"><code class="computeroutput"><span class="identifier">numeric_cast</span></code></a> -可以在转换一个数字类型时检查范围的损失,如果范围不能被保持就抛出一个异常。 </p>
-<p> There are several situations where conversions are unsafe:<br>
-当转换是不安全的时候,有以下几各种情况: </p>
-<div class="itemizedlist">
-<ul type="disc">
-<li> Conversions from an integral type with a wider range than
-the target integral type.<br>从一个比目标类型范围更宽的整型类型进行转换。 </li>
-<li> Conversions from unsigned to signed (and vice versa)
-integral types.<br>从无符号整型到有符号整型(以及相反方向)的转换。 </li>
-<li> Conversions from floating point types to integral types.<br>从浮点类型 到整型类型的转换。 </li>
-</ul>
-</div>
-<p> The C++ Standard does not specify the behavior when a numeric
-type is assigned a value that cannot be represented by the type, except
-for unsigned integral types [3.9.1.4], which must obey the laws of
-arithmetic modulo 2n (this implies that the result will be reduced
-modulo the number that is one greater than the largest value that can
-be represented). The fact that the behavior for overflow is undefined
-for all conversions (except the aforementioned unsigned to unsigned)
-makes any code that may produce positive or negative overflows exposed
-to portability issues.<br>C+
-+标准没有规定当一个数字类型被赋予一个该类型不能表示的值时的行为,除了无符号 整数类型以外[3.9.1.4],后者必须遵守模2n算术的法则(这意味 -着结果会将大于可表示的最大值的数进行取模降值)。事实上,对于所有转换(除了上 述的无符号至无符号的转换),溢出的行为是未定义的,这使得任何可能产生
-正或负的溢出的代码都存在可移植性的问题。 </p>
-<p> <code class="computeroutput"><span class="identifier">numeric_cast</span></code>
-adheres to the rules for implicit conversions mandated by the C++
-Standard, such as truncating floating point types when converting to
-integral types. The implementation must guarantee that for a conversion
-to a type that can hold all possible values of the source type, there
-will be no runtime overhead.<br><code class="computeroutput"><span class="identifier">numeric_cast</span></code> 遵守C++标准所制定的隐式转换规 则,例如将浮点类型转换为整型类型时进行截断。其实现必须保证对于到一个类型的转 换,可以保持源类型的所有可能值,且没有运行期开销。 </p>
-</div>
-<a name="numeric_conversion_numeric_cast"></a>
-<p> </p>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.improved_numeric_cast__.numeric_cast"></a><a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.numeric_cast" title="numeric_cast">numeric_cast</a>
-</h3>
-</div>
-</div>
-</div>
-<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span> <span class="keyword">inline</span><br><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">result_type</span><br><span class="identifier">numeric_cast</span> <span class="special">(</span> <span class="identifier">Source</span> <span class="identifier">arg</span> <span class="special">)</span><br><span class="special">{</span><br><span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">convert</span><span class="special">(</span><span class="identifier">arg</span><span class="special">);</span><br><span class="special">}</span>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.improved_numeric_cast__.numeric_cast"></a><a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.numeric_cast" title="numeric_cast">numeric_cast</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span> <span class="keyword">inline</span> +<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">result_type</span> +<span class="identifier">numeric_cast</span> <span class="special">(</span> <span class="identifier">Source</span> <span class="identifier">arg</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">convert</span><span class="special">(</span><span class="identifier">arg</span><span class="special">);</span>
+<span class="special">}</span>
 </pre>
-<p> <code class="computeroutput"><span class="identifier">numeric_cast</span></code>
-returns the result of converting a value of type Source to a value of
-type Target. If out-of-range is detected, an exception is thrown (see <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_bad_numeric_cast">bad_numeric_cast</a>, -<a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_negative_overflow">negative_overflow</a> -and <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_possitive_overflow">positive_overflow</a> -).<br><code class="computeroutput"><span class="identifier">numeric_cast</span></code> -返回一个类型为 Source 的值转换为类型为 Target 的值的结果。如果检测到超出范 围,将抛出一个异常(请见 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_bad_numeric_cast">bad_numeric_cast</a>, -<a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_negative_overflow">negative_overflow</a> 和 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_possitive_overflow">positive_overflow</a>
-). </p>
+<p>
+ <code class="computeroutput"><span class="identifier">numeric_cast</span></code> returns the + result of converting a value of type Source to a value of type Target. If + out-of-range is detected, an exception is thrown (see <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_bad_numeric_cast">bad_numeric_cast</a>, + <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_negative_overflow">negative_overflow</a> + and <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_possitive_overflow">positive_overflow</a> + ).<br> <code class="computeroutput"><span class="identifier">numeric_cast</span></code> &#36820;&#22238;&#19968;&#20010;&#31867;&#22411;&#20026; + Source &#30340;&#20540;&#36716;&#25442;&#20026;&#31867;&#22411;&#20026; Target &#30340;&#20540;&#30340;&#32467;&#26524;&#12290; &#22914;&#26524;&#26816;&#27979;&#21040;&#36229;&#20986;&#33539;&#22260;&#65292;&#23558;&#25243;&#20986;&#19968;&#20010;&#24322;&#24120;(&#35831;&#35265; + <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_bad_numeric_cast">bad_numeric_cast</a>, + <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_negative_overflow">negative_overflow</a> + &#21644; <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_possitive_overflow">positive_overflow</a>).
+      </p>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.improved_numeric_cast__.examples"></a><a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.examples" title="Examples">Examples 例子</a>
-</h3>
-</div>
-</div>
-</div>
-<p> The following example performs some typical conversions
-between numeric types:<br>以下例子执行了一些数字类型间的典型转换: </p>
-<div class="orderedlist">
-<ol type="1">
-<li> include &lt;boost/numeric/conversion/cast.hpp&gt; </li>
-<li> include &lt;iostream&gt; </li>
-</ol>
-</div>
-<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span><br><span class="special">{</span><br><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric_cast</span><span class="special">;</span><br><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bad_numeric_cast</span><span class="special">;</span><br><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">positive_overflow</span><span class="special">;</span><br><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">negative_overflow</span><span class="special">;</span><br><span class="keyword">try</span><br><span class="special">{</span><br><span class="keyword">int</span> <span class="identifier">i</span><span class="special">=</span><span class="number">42</span><span class="special">;</span><br><span class="keyword">short</span> <span class="identifier">s</span><span class="special">=</span><span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">&gt;(</span><span class="identifier">i</span><span class="special">);</span> <span class="comment">// This conversion succeeds (is in range) 转换成功(在范围内)<br></span> <span class="special">}</span><br><span class="keyword">catch</span><span class="special">(</span><span class="identifier">negative_overflow</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span><br><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span><br><span class="special">}</span><br><span class="keyword">catch</span><span class="special">(</span><span class="identifier">positive_overflow</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span><br><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span><br><span class="special">}</span><br><span class="keyword">try</span><br><span class="special">{</span><br><span class="keyword">float</span> <span class="identifier">f</span><span class="special">=-</span><span class="number">42.1234</span><span class="special">;</span><br><span class="comment">// This will cause a boost::numeric::negative_overflow exception to be thrown<br>// 这将引发一个</span><span class="comment"> boost::numeric::negative_overflow</span><span class="comment"> 异常被抛出 <br></span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">=</span><span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">f</span><span class="special">);</span><br><span class="special">}</span><br><span class="keyword">catch</span><span class="special">(</span><span class="identifier">bad_numeric_cast</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span><br><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span><br><span class="special">}</span><br><span class="keyword">double</span> <span class="identifier">d</span><span class="special">=</span> <span class="identifier">f</span> <span class="special">+</span> <span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;(</span><span class="number">123</span><span class="special">);</span> <span class="comment">// int -&gt; double<br></span><br><span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="identifier">l</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">();</span><br><span class="keyword">try</span><br><span class="special">{</span><br><span class="comment">// This will cause a boost::numeric::positive_overflow exception to be thrown<br></span> <span class="comment">// NOTE: *operations* on unsigned integral types cannot cause overflow<br></span> <span class="comment">// but *conversions* to a signed type ARE range checked by numeric_cast.<br>// </span><span class="comment">这将引发一个 </span><span class="comment"> boost::numeric::</span><span class="comment">positive</span><span class="comment">_overflow</span><span class="comment"> 异常被抛出</span><span class="comment"> <br>// 注:在无符号 整数类型上的*operations*不会引起溢出,<br>// 但是</span><span class="comment">在有符号类型上的*operations*则要由 </span><span class="comment">numeric_cast</span><span class="comment"> 进行范围检查 </span><span class="comment"> <br></span><br><span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">=</span><span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">&gt;(</span><span class="identifier">l</span><span class="special">);</span><br><span class="special">}</span><br><span class="keyword">catch</span><span class="special">(</span><span class="identifier">positive_overflow</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span><br><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span><br><span class="special">}</span><br><span class="keyword">return</span> <span class="number">0</span><span class="special">;</span><br><span class="special">}</span>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.improved_numeric_cast__.examples"></a><a class="link" href="improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.examples" title="Examples &#20363;&#23376;">
+      Examples &#20363;&#23376;</a>
+</h3></div></div></div>
+<p>
+ The following example performs some typical conversions between numeric types:<br> + &#20197;&#19979;&#20363;&#23376;&#25191;&#34892;&#20102;&#19968;&#20123;&#25968;&#23383;&#31867;&#22411;&#38388;&#30340;&#20856;&#22411;&#36716;&#25442;&#65306;
+      </p>
+<div class="orderedlist"><ol type="1">
+<li>
+          include &lt;boost/numeric/conversion/cast.hpp&gt;
+        </li>
+<li>
+          include &lt;iostream&gt;
+        </li>
+</ol></div>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric_cast</span><span class="special">;</span>
+
+ <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">bad_numeric_cast</span><span class="special">;</span> + <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">positive_overflow</span><span class="special">;</span> + <span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">negative_overflow</span><span class="special">;</span>
+
+    <span class="keyword">try</span>
+    <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">i</span><span class="special">=</span><span class="number">42</span><span class="special">;</span> + <span class="keyword">short</span> <span class="identifier">s</span><span class="special">=</span><span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">short</span><span class="special">&gt;(</span><span class="identifier">i</span><span class="special">);</span> <span class="comment">// This conversion succeeds (is in range) &#36716;&#25442;&#25104;&#21151;(&#22312;&#33539;&#22260;&#20869;)
+</span>    <span class="special">}</span>
+ <span class="keyword">catch</span><span class="special">(</span><span class="identifier">negative_overflow</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span>
+    <span class="special">}</span>
+ <span class="keyword">catch</span><span class="special">(</span><span class="identifier">positive_overflow</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span>
+    <span class="special">}</span>
+
+    <span class="keyword">try</span>
+    <span class="special">{</span>
+ <span class="keyword">float</span> <span class="identifier">f</span><span class="special">=-</span><span class="number">42.1234</span><span class="special">;</span>
+
+ <span class="comment">// This will cause a boost::numeric::negative_overflow exception to be thrown +</span> <span class="comment">// &#36825;&#23558;&#24341;&#21457;&#19968;&#20010; boost::numeric::negative_overflow &#24322;&#24120;&#34987;&#25243;&#20986; +</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">i</span><span class="special">=</span><span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">&gt;(</span><span class="identifier">f</span><span class="special">);</span>
+    <span class="special">}</span>
+ <span class="keyword">catch</span><span class="special">(</span><span class="identifier">bad_numeric_cast</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span>
+    <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">d</span><span class="special">=</span> <span class="identifier">f</span> <span class="special">+</span> <span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;(</span><span class="number">123</span><span class="special">);</span> <span class="comment">// int -&gt; double
+</span>
+ <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="identifier">l</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">long</span><span class="special">&gt;::</span><span class="identifier">max</span><span class="special">();</span>
+
+    <span class="keyword">try</span>
+    <span class="special">{</span>
+ <span class="comment">// This will cause a boost::numeric::positive_overflow exception to be thrown +</span> <span class="comment">// NOTE: *operations* on unsigned integral types cannot cause overflow +</span> <span class="comment">// but *conversions* to a signed type ARE range checked by numeric_cast. +</span> <span class="comment">// &#36825;&#23558;&#24341;&#21457;&#19968;&#20010; boost::numeric::positive_overflow &#24322;&#24120;&#34987;&#25243;&#20986; +</span> <span class="comment">// &#27880;&#65306;&#22312;&#26080;&#31526;&#21495;&#25972;&#25968;&#31867;&#22411;&#19978;&#30340;*operations*&#19981;&#20250;&#24341;&#36215;&#28322;&#20986;&#65292; +</span> <span class="comment">// &#20294;&#26159;&#22312;&#26377;&#31526;&#21495;&#31867;&#22411;&#19978;&#30340;*operations*&#21017;&#35201;&#30001; numeric_cast &#36827;&#34892;&#33539;&#22260;&#26816;&#26597;
+</span>
+ <span class="keyword">unsigned</span> <span class="keyword">char</span> <span class="identifier">c</span><span class="special">=</span><span class="identifier">numeric_cast</span><span class="special">&lt;</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">&gt;(</span><span class="identifier">l</span><span class="special">);</span>
+    <span class="special">}</span>
+ <span class="keyword">catch</span><span class="special">(</span><span class="identifier">positive_overflow</span><span class="special">&amp;</span> <span class="identifier">e</span><span class="special">)</span> <span class="special">{</span> + <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">();</span>
+    <span class="special">}</span>
+
+
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
 </pre>
 </div>
 </div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%">
-<tbody>
-<tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right">
-<div class="copyright-footer">Copyright © 2004 -2007
-Fernando Luis Cacciola Carballal
-<p> Distributed under the Boost Software License, Version
-1.0. (See accompanying 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>)
-</p>
-</div>
-</td>
-</tr>
-</tbody>
-</table>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + 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>)
+      </p>
+</div></td>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="numeric_converter_policy_classes.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../numeric_conversion/history_and_acknowledgments.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a></div>
-</body></html>
+<div class="spirit-nav">
+<a accesskey="p" href="numeric_converter_policy_classes.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../numeric_conversion/history_and_acknowledgments.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/numeric_converter_policy_classes.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/numeric_converter_policy_classes.html Mon Mar 22 20:44:11 2010
@@ -1,45 +1,44 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-<title>Numeric Converter Policy Classes</title><link rel="stylesheet" href="../boostbook.css" type="text/css">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> <link rel="prev" href="conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class"> -<link rel="next" href="improved_numeric_cast__.html" title="Improved numeric_cast&lt;&gt;"></head> -<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
-<table cellpadding="2" width="100%"><tbody><tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="next" href="improved_numeric_cast__.html" title="Improved numeric_cast&lt;&gt; &#25913;&#36827;&#30340;numeric_cast&lt;&gt;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="conversion_traits___traits_class.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="improved_numeric_cast__.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both;">
-<a name="boost_numericconversion.numeric_converter_policy_classes"></a><a class="link" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes">Numeric
-    Converter Policy Classes 数字转换器策略类</a>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_numericconversion.numeric_converter_policy_classes"></a><a class="link" href="numeric_converter_policy_classes.html" title="Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;"> + Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;</a>
 </h2></div></div></div>
 <div class="toc"><dl>
<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result">enum
       range_check_result</a></span></dt>
-<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler">Policy
-      OverflowHandler 策略 OverflowHandler</a></span></dt>
-<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder">Policy
-      Float2IntRounder 策略 Float2IntRounder</a></span></dt>
-<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter">Policy
-      RawConverter 策略 RawConverter</a></span></dt>
-<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker">Policy
-      UserRangeChecker 策略 UserRangeChecker</a></span></dt>
+<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler"> + Policy OverflowHandler &#31574;&#30053;OverflowHandler</a></span></dt> +<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder"> + Policy Float2IntRounder &#31574;&#30053;Float2IntRounder </a></span></dt> +<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter">
+      Policy RawConverter &#31574;&#30053;RawConverter</a></span></dt>
+<dt><span class="section"><a href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker"> + Policy UserRangeChecker &#31574;&#30053;UserRangeChecker </a></span></dt>
 </dl></div>
-<a name="numeric_conversion_converter_policies_range_check_result"></a><p>
-    </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
<a name="boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result" title="enum range_check_result">enum
@@ -57,41 +56,47 @@
 <span class="special">}</span> <span class="special">}</span>
 </pre>
 <p>
- Defines the values returned by <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="identifier">out_of_range</span><span class="special">()<br></span></code>定义由 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="identifier">out_of_range</span><span class="special">()</span></code> 返回的值。<code class="computeroutput"><span class="special"></span></code> + Defines the values returned by <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="identifier">out_of_range</span><span class="special">()</span></code><br> &#23450;&#20041;&#30001; <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">numeric</span><span class="special">::</span><span class="identifier">converter</span><span class="special">&lt;&gt;::</span><span class="identifier">out_of_range</span><span class="special">()</span></code> &#36820;&#22238;&#30340;&#20540;&#12290;
       </p>
 </div>
-<a name="numeric_conversion_policy_overflow_handler"></a><p>
-    </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler" title="Policy OverflowHandler">Policy
-      OverflowHandler 策略 OverflowHandler</a>
+<a name="boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler" title="Policy OverflowHandler &#31574;&#30053;OverflowHandler">
+      Policy OverflowHandler &#31574;&#30053;OverflowHandler</a>
 </h3></div></div></div>
 <p>
This <span class="emphasis"><em>stateless</em></span> non-template policy class must be a <span class="emphasis"><em>function object</em></span> and is called to administrate the result of the range checking. It can throw an exception if overflow has been detected by the range checking as indicated by its argument. If it throws, is is recommended - that it be <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_cast</span></code> or derived.<br>这个<span class="emphasis"><em>无状态</em></span>非模板策略类必须是一个<span class="emphasis"><em>函数对象</em></span>,它被调用来对范围检查的结果进行处 理。如果范围检查已检测出溢出并通过调用实参来表示,则它可以抛出一个异常。如果 要抛出异常,建议使用 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_cast</span></code> 或其派生类。 + that it be <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_cast</span></code> or derived.<br> &#36825;&#20010;<span class="emphasis"><em>&#26080;&#29366;&#24577;</em></span>&#38750;&#27169;&#26495;&#31574;&#30053;&#31867;&#24517;&#39035;&#26159;&#19968;&#20010;<span class="emphasis"><em>&#20989;&#25968;&#23545;&#35937;</em></span>&#65292;&#23427;&#34987;&#35843;&#29992;&#26469;&#23545;&#33539;&#22260;&#26816;&#26597;&#30340;&#32467;&#26524;&#36827;&#34892;&#22788;&#29702;&#12290; + &#22914;&#26524;&#33539;&#22260;&#26816;&#26597;&#24050;&#26816;&#27979;&#20986;&#28322;&#20986;&#24182;&#36890;&#36807;&#35843;&#29992;&#23454;&#21442;&#26469;&#34920;&#31034;&#65292;&#21017;&#23427;&#21487;&#20197;&#25243;&#20986;&#19968;&#20010;&#24322;&#24120;&#12290;&#22914;&#26524;&#35201;&#25243;&#20986;&#24322;&#24120;&#65292;&#24314;&#35758;&#20351;&#29992; + <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_cast</span></code> &#25110;&#20854;&#27966;&#29983;&#31867;&#12290;
       </p>
 <p>
- It must have the following interface (it does not has to be a template class):<br>它必须具有以下接口(不必是模板类): + It must have the following interface (it does not has to be a template class):<br> + &#23427;&#24517;&#39035;&#20855;&#26377;&#20197;&#19979;&#25509;&#21475;(&#19981;&#24517;&#26159;&#27169;&#26495;&#31867;)&#65306;
       </p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">YourOverflowHandlerPolicy</span>
 <span class="special">{</span>
- <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_check_result</span> <span class="special">)</span> <span class="special">;</span> <span class="comment">// throw bad_cast or derived<br></span><span class="special">}</span> <span class="special">;</span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_check_result</span> <span class="special">)</span> <span class="special">;</span> <span class="comment">// throw bad_cast or derived
+</span><span class="special">}</span> <span class="special">;</span>
 </pre>
 <p>
- It is called with the result of the converter's <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> inside <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code>.<br>该函数函数被以 <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> 内的转换器的 <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code><code class="computeroutput"><span class="special"></span></code> 为参数调用。 + It is called with the result of the converter's <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> inside <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code>.<br> &#35813;&#20989;&#25968;&#20989;&#25968;&#34987;&#20197; <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> + &#20869;&#30340;&#36716;&#25442;&#22120;&#30340; <code class="computeroutput"><span class="identifier">out_of_range</span><span class="special">()</span></code> &#20026;&#21442;&#25968;&#35843;&#29992;&#12290;
       </p>
 <p>
- These are the two overflow handler classes provided by the library:<br>本库提供了两个重载的处理类: + These are the two overflow handler classes provided by the library:<br> + &#26412;&#24211;&#25552;&#20379;&#20102;&#20004;&#20010;&#37325;&#36733;&#30340;&#22788;&#29702;&#31867;&#65306;
       </p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

<span class="keyword">struct</span> <span class="identifier">def_overflow_handler</span>
     <span class="special">{</span>
- <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">range_check_result</span> <span class="identifier">r</span> <span class="special">)</span> <span class="comment">// throw bad_numeric_conversion derived<br> // 抛出 </span><span class="comment"> bad_numeric_conversion</span><span class="comment"> 的派生类<br></span> <span class="special">{</span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">range_check_result</span> <span class="identifier">r</span> <span class="special">)</span> <span class="comment">// throw bad_numeric_conversion derived +</span> <span class="comment">// &#25243;&#20986; bad_numeric_conversion &#30340;&#27966;&#29983;&#31867;
+</span>        <span class="special">{</span>
<span class="keyword">if</span> <span class="special">(</span> <span class="identifier">r</span> <span class="special">==</span> <span class="identifier">cNegOverflow</span> <span class="special">)</span> <span class="keyword">throw</span> <span class="identifier">negative_overflow</span><span class="special">()</span> <span class="special">;</span> <span class="keyword">else</span> <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">r</span> <span class="special">==</span> <span class="identifier">cPosOverflow</span> <span class="special">)</span>
@@ -101,7 +106,8 @@

<span class="keyword">struct</span> <span class="identifier">silent_overflow_handler</span>
     <span class="special">{</span>
- <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">range_check_result</span> <span class="special">)</span> <span class="comment">// no-throw 无抛出 <br></span> <span class="special">{}</span> + <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()</span> <span class="special">(</span> <span class="identifier">range_check_result</span> <span class="special">)</span> <span class="comment">// no-throw &#26080;&#25243;&#20986;
+</span>        <span class="special">{}</span>
     <span class="special">}</span> <span class="special">;</span>

 <span class="special">}</span> <span class="special">}</span>
@@ -109,7 +115,7 @@
 <p>
And these are the Exception Classes thrown by the default overflow handler <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler_important_note">(see - IMPORTANT note)</a><br>以下是被缺省的溢出处理器所抛出的异常类<a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler_important_note">(请 见重要说明)</a> + IMPORTANT note)</a><br> &#20197;&#19979;&#26159;&#34987;&#32570;&#30465;&#30340;&#28322;&#20986;&#22788;&#29702;&#22120;&#25152;&#25243;&#20986;&#30340;&#24322;&#24120;&#31867;<a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler_important_note">(&#35831;&#35265;&#37325;&#35201;&#35828;&#26126;)</a>
       </p>
<a name="numeric_conversion_bad_numeric_cast"></a><a name="numeric_conversion_negative_overflow"></a><a name="numeric_conversion_possitive_overflow"></a><pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -117,7 +123,8 @@
<span class="keyword">class</span> <span class="identifier">bad_numeric_cast</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">bad_cast</span>
     <span class="special">{</span>
         <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="comment">// throw()<br></span> <span class="special">{</span> + <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="comment">// throw()
+</span>        <span class="special">{</span>
<span class="keyword">return</span> <span class="string">"bad numeric conversion: overflow"</span><span class="special">;</span>
         <span class="special">}</span>

@@ -127,7 +134,8 @@
<span class="keyword">class</span> <span class="identifier">negative_overflow</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">bad_numeric_cast</span>
     <span class="special">{</span>
         <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="comment">// throw()<br></span> <span class="special">{</span> + <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="comment">// throw()
+</span>        <span class="special">{</span>
<span class="keyword">return</span> <span class="string">"bad numeric conversion: negative overflow"</span><span class="special">;</span>
         <span class="special">}</span>
     <span class="special">};</span>
@@ -136,7 +144,8 @@
<span class="keyword">class</span> <span class="identifier">positive_overflow</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">bad_numeric_cast</span>
     <span class="special">{</span>
         <span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="comment">// throw()<br></span> <span class="special">{</span> + <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="identifier">what</span><span class="special">()</span> <span class="keyword">const</span> <span class="comment">// throw()
+</span>        <span class="special">{</span>
<span class="keyword">return</span> <span class="string">"bad numeric conversion: positive overflow"</span><span class="special">;</span>
         <span class="special">}</span>
     <span class="special">};</span>
@@ -146,10 +155,10 @@
 </pre>
 <a name="numeric_conversion_policy_overflow_handler_important_note"></a><p>
       </p>
-<div class="important"><table summary="Important" border="0">
-<tbody><tr>
+<div class="important"><table border="0" summary="Important">
+<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../../../../doc/html/images/important.png"></td>
-<th align="left">Important 重要</th>
+<th align="left">Important</th>
 </tr>
 <tr><td align="left" valign="top"><p>
<span class="bold"><strong>RELEASE NOTE for 1.33</strong></span> Previous to boost
@@ -162,28 +171,35 @@
the <code class="computeroutput"><span class="identifier">bad_numeric_cast</span></code> as its exception type so I decided to avoid backward compatibility problems by adopting it (guessing that the user base for the old code is wider than - for the new code).</p><p><span class="bold"><strong>对&nbsp;1.33 版本的说明</strong></span> 在 boost - 版本 1.33 之前,异常类 <code class="computeroutput"><span class="identifier">bad_numeric_cast</span></code> - 命名为 <code class="computeroutput"><span class="identifier">bad_numeric_conversion</span></code>。但是,在 1.33 中,来自 <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> 的旧函数 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> 已完全被 <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> 中的新 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> 所替代(而且现在 <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> 被包含在 <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> 中)。那些 在 boost 中已经存在了一段时间的旧函数是把 <code class="computeroutput"><span class="identifier">bad_numeric_cast</span></code> 用作其异常类型的,所以我决 定通过采用这个异常类以避免后向兼容性的问题(我猜测基于旧代码的用户经多于基于 新代码的)。 + for the new code).<br> <span class="bold"><strong>&#23545;1.33&#29256;&#26412;&#30340;&#35828;&#26126;</strong></span> + &#22312; boost &#29256;&#26412; 1.33 &#20043;&#21069;&#65292;&#24322;&#24120;&#31867; <code class="computeroutput"><span class="identifier">bad_numeric_cast</span></code> + &#21629;&#21517;&#20026; <code class="computeroutput"><span class="identifier">bad_numeric_conversion</span></code>&#12290; + &#20294;&#26159;&#65292;&#22312; 1.33 &#20013;&#65292;&#26469;&#33258; <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> + &#30340;&#26087;&#20989;&#25968; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> &#24050;&#23436;&#20840;&#34987; <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> + &#20013;&#30340;&#26032; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> &#25152;&#26367;&#20195;(&#32780;&#19988;&#29616;&#22312; <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> &#34987;&#21253;&#21547;&#22312; <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">numeric</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">cast</span><span class="special">.</span><span class="identifier">hpp</span></code> + &#20013;)&#12290; &#37027;&#20123;&#22312; boost &#20013;&#24050;&#32463;&#23384;&#22312;&#20102;&#19968;&#27573;&#26102;&#38388;&#30340;&#26087;&#20989;&#25968;&#26159;&#25226; + <code class="computeroutput"><span class="identifier">bad_numeric_cast</span></code> &#29992;&#20316;&#20854;&#24322;&#24120;&#31867;&#22411;&#30340;&#65292; + &#25152;&#20197;&#25105;&#20915;&#23450;&#36890;&#36807;&#37319;&#29992;&#36825;&#20010;&#24322;&#24120;&#31867;&#20197;&#36991;&#20813;&#21518;&#21521;&#20860;&#23481;&#24615;&#30340;&#38382;&#39064;(&#25105;&#29468;&#27979;&#22522;&#20110;&#26087;&#20195;&#30721;&#30340;&#29992;&#25143;&#32463;&#22810;&#20110;&#22522;&#20110;&#26032;&#20195;&#30721;&#30340;)&#12290;
         </p></td></tr>
-</tbody></table></div>
+</table></div>
 </div>
-<a name="numeric_conversion_policy_float_to_int_rounder"></a><p>
-    </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder" title="Policy Float2IntRounder">Policy
-      Float2IntRounder 策略 Float2IntRounder</a>
+<a name="boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder" title="Policy Float2IntRounder &#31574;&#30053;Float2IntRounder">
+      Policy Float2IntRounder &#31574;&#30053;Float2IntRounder </a>
 </h3></div></div></div>
 <p>
This <span class="emphasis"><em>stateless</em></span> template policy class specifies the rounding mode used for <span class="underline">float to integral</span> conversions. It supplies the <code class="computeroutput"><span class="identifier">nearbyint</span><span class="special">()</span></code> static member function exposed by the converter, which means that it <span class="underline">publicly inherits from this - policy</span>.<br>这个<span class="emphasis"><em>无状态 </em></span>模板策略类指定用于 <span class="underline">浮点至整型</span> 转 换的舍入方式。它提供了由转换器暴露出来的 <code class="computeroutput"><span class="identifier">nearbyint</span><span class="special">()</span></code> 静 态成员函数,即转换器要 <span class="underline">公有地继承自这个策略</span>。 + policy</span>.<br> &#36825;&#20010;<span class="emphasis"><em>&#26080;&#29366;&#24577;</em></span>&#27169;&#26495;&#31574;&#30053;&#31867;&#25351;&#23450;&#29992;&#20110; + <span class="underline">&#28014;&#28857;&#33267;&#25972;&#22411;</span> &#36716;&#25442;&#30340;&#33293;&#20837;&#26041;&#24335;&#12290;&#23427;&#25552;&#20379;&#20102;&#30001;&#36716;&#25442;&#22120;&#26292;&#38706;&#20986;&#26469;&#30340; + <code class="computeroutput"><span class="identifier">nearbyint</span><span class="special">()</span></code> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#65292; &#21363;&#36716;&#25442;&#22120;&#35201; <span class="underline">&#20844;&#26377;&#22320;&#32487;&#25215;&#33258;&#36825;&#20010;&#31574;&#30053;</span>&#12290;
       </p>
 <p>
- The policy must have the following interface:<br>该策略必须具有以下 接口: + The policy must have the following interface:<br> &#35813;&#31574;&#30053;&#24517;&#39035;&#20855;&#26377;&#20197;&#19979;&#25509;&#21475;&#65306;
       </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">S</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">YourFloat2IntRounderPolicy</span>
@@ -199,19 +215,21 @@
 </pre>
 <p>
These are the rounder classes provided by the library (only the specific - parts are shown, see the general policy form above)<br>本库提供了几 个舍入器类(以下仅展示规格部分,参见上面的通用策略形式) + parts are shown, see the general policy form above)<br> &#26412;&#24211;&#25552;&#20379;&#20102;&#20960;&#20010;&#33293;&#20837;&#22120;&#31867;(&#20197;&#19979;&#20165;&#23637;&#31034;&#35268;&#26684;&#37096;&#20998;&#65292;&#21442;&#35265;&#19978;&#38754;&#30340;&#36890;&#29992;&#31574;&#30053;&#24418;&#24335;)
       </p>
-<div class="note"><table summary="Note" border="0">
-<tbody><tr>
+<div class="note"><table border="0" summary="Note">
+<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
-<th align="left">Note 说明</th>
+<th align="left">Note</th>
 </tr>
 <tr><td align="left" valign="top"><p>
These classes are not intended to be general purpose rounding functions but specific policies for <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code>. This is why they are not function - objects.</p><p>这些类并不是通用的舍入函数,而是专门用于 <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> 的策略。这正是为什么它们不是函数对象 的原因。 + objects.<br> &#36825;&#20123;&#31867;&#24182;&#19981;&#26159;&#36890;&#29992;&#30340;&#33293;&#20837;&#20989;&#25968;&#65292;&#32780;&#26159;&#19987;&#38376;&#29992;&#20110; + <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> + &#30340;&#31574;&#30053;&#12290;&#36825;&#27491;&#26159;&#20026;&#20160;&#20040;&#23427;&#20204;&#19981;&#26159;&#20989;&#25968;&#23545;&#35937;&#30340;&#21407;&#22240;&#12290;
         </p></td></tr>
-</tbody></table></div>
+</table></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>


@@ -266,49 +284,53 @@
<span class="keyword">typedef</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">integral_c</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">float_round_style</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">round_toward_neg_infinity</span><span class="special">&gt;</span> <span class="identifier">round_style</span> <span class="special">;</span>
     <span class="special">}</span> <span class="special">;</span>

-<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace numeric, namespace boost<br></span></pre> -<a name="boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder.math_functions_used_by_the_rounder_policies"></a><h5>
-<a name="id2654218"></a>
- <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder.math_functions_used_by_the_rounder_policies">Math - Functions used by the rounder policies&nbsp;舍入器策略所使用的数学 函数</a> +<span class="special">}</span> <span class="special">}</span> <span class="comment">// namespace numeric, namespace boost
+</span></pre>
+<a name="boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder.math_functions_used_by_the_rounder_policies________________________________________"></a><h5>
+<a name="id4885252"></a>
+ <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder.math_functions_used_by_the_rounder_policies________________________________________">Math + Functions used by the rounder policies &#33293;&#20837;&#22120;&#31574;&#30053;&#25152;&#20351;&#29992;&#30340;&#25968;&#23398;&#20989;&#25968;</a>
       </h5>
 <p>
The rounder policies supplied by this header use math functions <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>. The standard versions of these functions are introduced in context by a using - directive, so in normal conditions, the standard functions will be used.<br>这个头文件所提供的舍入器策略使用了数学函数 <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> 和 <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>。这些函 数的标准版本是通过一个 using
-        指令引入到上下文中的,所以在正常情况下,将使用标准函数。
+ directive, so in normal conditions, the standard functions will be used.<br> + &#36825;&#20010;&#22836;&#25991;&#20214;&#25152;&#25552;&#20379;&#30340;&#33293;&#20837;&#22120;&#31574;&#30053;&#20351;&#29992;&#20102;&#25968;&#23398;&#20989;&#25968; <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> + &#21644; <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>&#12290; + &#36825;&#20123;&#20989;&#25968;&#30340;&#26631;&#20934;&#29256;&#26412;&#26159;&#36890;&#36807;&#19968;&#20010; using &#25351;&#20196;&#24341;&#20837;&#21040;&#19978;&#19979;&#25991;&#20013;&#30340;&#65292;&#25152;&#20197;&#22312;&#27491;&#24120;&#24773;&#20917;&#19979;&#65292;&#23558;&#20351;&#29992;&#26631;&#20934;&#20989;&#25968;&#12290;
       </p>
 <p>
However, if there are other visible corresponding overloads an ambiguity could arise. In this case, the user can supply her own rounder policy which - could, for instance, use a fully qualified call.<br>但是,如果存在 其它可见的重载函数,将发生歧义。这种情况下,用户可以提供自己的舍入器策略,例 如使用一个全限定调用。 + could, for instance, use a fully qualified call.<br> &#20294;&#26159;&#65292;&#22914;&#26524;&#23384;&#22312;&#20854;&#23427;&#21487;&#35265;&#30340;&#37325;&#36733;&#20989;&#25968;&#65292;&#23558;&#21457;&#29983;&#27495;&#20041;&#12290;&#36825;&#31181;&#24773;&#20917;&#19979;&#65292;&#29992;&#25143;&#21487;&#20197;&#25552;&#20379;&#33258;&#24049;&#30340;&#33293;&#20837;&#22120;&#31574;&#30053;&#65292;&#20363;&#22914;&#20351;&#29992;&#19968;&#20010;&#20840;&#38480;&#23450;&#35843;&#29992;&#12290;
       </p>
 <p>
This technique allows the default rounder policies to be used directly with user defined types. The user only requires that suitable overloads of <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code> - be visible. See also <a class="link" href="../index.html#numeric_conversion_requirements">User - Defined Numeric Types</a> support.<br>这一技术允许缺省的舍入器策略 直接用于用户自定义类型。用户只要求适当的 <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> 和 <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code> - 重载是可见的。请参见 <a class="link" href="../index.html#numeric_conversion_requirements">用户自定义数字类型的支 持</a>。 + be visible. See also <a class="link" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;">User + Defined Numeric Types</a> support.<br> &#36825;&#19968;&#25216;&#26415;&#20801;&#35768;&#32570;&#30465;&#30340;&#33293;&#20837;&#22120;&#31574;&#30053;&#30452;&#25509;&#29992;&#20110;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#12290;&#29992;&#25143;&#21482;&#35201;&#27714;&#36866;&#24403;&#30340; + <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> + &#21644; <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code> + &#37325;&#36733;&#26159;&#21487;&#35265;&#30340;&#12290; &#35831;&#21442;&#35265; <a class="link" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;">&#29992;&#25143;&#33258;&#23450;&#20041;&#25968;&#23383;&#31867;&#22411;&#30340;&#25903;&#25345;</a>&#12290;
       </p>
 </div>
-<a name="numeric_conversion_policy_raw_converter"></a><p>
-    </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter">Policy
-      RawConverter 策略 RawConverter</a>
+<a name="boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">
+      Policy RawConverter &#31574;&#30053;RawConverter</a>
 </h3></div></div></div>
 <p>
This <span class="emphasis"><em>stateless</em></span> template policy class is used to perform the actual conversion from Source to Target. It supplies the <code class="computeroutput"><span class="identifier">low_level_convert</span><span class="special">()</span></code> static member function exposed by the converter, which means that it publicly - inherits from this policy.<br>这个<span class="emphasis"><em>无状态 </em></span>模板策略类用于执行从源类型到目标类型的实际转换。它提供了由转换器 所暴露的 <code class="computeroutput"><span class="identifier">low_level_convert</span><span class="special">()</span></code>
-        静态成员函数,即转换器是公有地继承自该策略的。
+ inherits from this policy.<br> &#36825;&#20010;<span class="emphasis"><em>&#26080;&#29366;&#24577;</em></span>&#27169;&#26495;&#31574;&#30053;&#31867;&#29992;&#20110;&#25191;&#34892;&#20174;&#28304;&#31867;&#22411;&#21040;&#30446;&#26631;&#31867;&#22411;&#30340;&#23454;&#38469;&#36716;&#25442;&#12290;&#23427;&#25552;&#20379;&#20102;&#30001;&#36716;&#25442;&#22120;&#25152;&#26292;&#38706;&#30340; + <code class="computeroutput"><span class="identifier">low_level_convert</span><span class="special">()</span></code> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#65292; &#21363;&#36716;&#25442;&#22120;&#26159;&#20844;&#26377;&#22320;&#32487;&#25215;&#33258;&#35813;&#31574;&#30053;&#30340;&#12290;
       </p>
 <p>
- The policy must have the following interface:<br>该策略必须具有以下 接口: + The policy must have the following interface:<br> &#35813;&#31574;&#30053;&#24517;&#39035;&#20855;&#26377;&#20197;&#19979;&#25509;&#21475;&#65306;
       </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">YourRawConverterPolicy</span>
@@ -322,10 +344,11 @@
 <p>
This policy is mostly provided as a hook for user defined types which don't support <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;&gt;</span></code> - conversions to some types<br>对于不支持 <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;&gt;</span></code> 转换为某些类型的用户自定义类型,通常 将这一策略作为一个吊钩提供。 + conversions to some types<br> &#23545;&#20110;&#19981;&#25903;&#25345; <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;&gt;</span></code> &#36716;&#25442;&#20026;&#26576;&#20123;&#31867;&#22411;&#30340;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#65292;&#36890;&#24120;&#23558;&#36825;&#19968;&#31574;&#30053;&#20316;&#20026;&#19968;&#20010;&#21514;&#38057;&#25552;&#20379;&#12290;
       </p>
 <p>
- This is the only raw converter policy class provided by the library:<br>以下是本库提供的唯一一个原始转换器策略类: + This is the only raw converter policy class provided by the library:<br> + &#20197;&#19979;&#26159;&#26412;&#24211;&#25552;&#20379;&#30340;&#21807;&#19968;&#19968;&#20010;&#21407;&#22987;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;&#65306;
       </p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">numeric</span> <span class="special">{</span>

@@ -337,39 +360,44 @@

<span class="keyword">static</span> <span class="identifier">result_type</span> <span class="identifier">low_level_convert</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span>
         <span class="special">{</span>
- <span class="keyword">return</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">result_type</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">;</span> <br> <span class="special">}</span> + <span class="keyword">return</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">result_type</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">;</span>
+        <span class="special">}</span>
     <span class="special">}</span> <span class="special">;</span>

 <span class="special">}</span> <span class="special">}</span>
 </pre>
 </div>
-<a name="numeric_conversion_policy_user_range_checker"></a><p>
-    </p>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker">Policy
-      UserRangeChecker 策略 UserRangeChecker</a>
+<a name="boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker"></a><a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">
+      Policy UserRangeChecker &#31574;&#30053;UserRangeChecker </a>
 </h3></div></div></div>
 <p>
This <span class="emphasis"><em>stateless</em></span> template policy class is used <span class="underline">only if supplied</span> to <span class="bold"><strong>override</strong></span> - the internal range checking logic.<br>这个<span class="emphasis"><em>无状态</em></span>模板策略类<span class="underline">仅 当</span>要<span class="bold"><strong>重载</strong></span>内部的范围检查逻辑 时使用。 + the internal range checking logic.<br> &#36825;&#20010;<span class="emphasis"><em>&#26080;&#29366;&#24577;</em></span>&#27169;&#26495;&#31574;&#30053;&#31867;<span class="underline">&#20165;&#24403;</span>&#35201;<span class="bold"><strong>&#37325;&#36733;</strong></span>&#20869;&#37096;&#30340;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#26102;&#20351;&#29992;&#12290;
       </p>
 <p>
It supplies the <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> static member function exposed by the converter, - which means that it publicly inherits from this policy.<br>它提供了 由转换器所暴露的 <code class="computeroutput"><span class="identifier">validate_range</span></code><code class="computeroutput"><span class="identifier"></span><span class="special">()</span></code>
-        静态成员函数,即转换器是公有地继承自该策略的。
+ which means that it publicly inherits from this policy.<br> &#23427;&#25552;&#20379;&#20102;&#30001;&#36716;&#25442;&#22120;&#25152;&#26292;&#38706;&#30340; + <code class="computeroutput"><span class="identifier">validate_range</span><span class="special">()</span></code> + &#38745;&#24577;&#25104;&#21592;&#20989;&#25968;&#65292;&#21363;&#36716;&#25442;&#22120;&#26159;&#20844;&#26377;&#22320;&#32487;&#25215;&#33258;&#35813;&#31574;&#30053;&#30340;&#12290;
       </p>
 <p>
- The policy must have the following interface:<br>该策略必须具有以下 接口: + The policy must have the following interface:<br> &#35813;&#31574;&#30053;&#24517;&#39035;&#20855;&#26377;&#20197;&#19979;&#25509;&#21475;&#65306;
       </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Traits</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">YourRangeCheckerPolicy</span>
 <span class="special">{</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">::</span><span class="identifier">argument_type</span> <span class="identifier">argument_type</span> <span class="special">;</span>

- <span class="comment">// Determines if the value 's' fits in the range of the Target type.<br> // 判断值 's' 是否适合目标类型的范围 <br></span> <span class="keyword">static</span> <span class="identifier">range_check_result</span> <span class="identifier">out_of_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> <span class="special">;</span>
-
- <span class="comment">// Checks whether the value 's' is out_of_range()<br></span> <span class="comment">// and passes the result of the check to the OverflowHandler policy.<br> // 检查值 's' 是否为 out_of_range(),并将检查结果传递给 OverflowHandler 策略。<br></span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">validate_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> + <span class="comment">// Determines if the value 's' fits in the range of the Target type. +</span> <span class="comment">// &#21028;&#26029;&#20540; 's' &#26159;&#21542;&#36866;&#21512;&#30446;&#26631;&#31867;&#22411;&#30340;&#33539;&#22260; +</span> <span class="keyword">static</span> <span class="identifier">range_check_result</span> <span class="identifier">out_of_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span> <span class="special">;</span>
+
+    <span class="comment">// Checks whether the value 's' is out_of_range()
+</span> <span class="comment">// and passes the result of the check to the OverflowHandler policy. +</span> <span class="comment">// &#26816;&#26597;&#20540; 's' &#26159;&#21542;&#20026; out_of_range()&#65292;&#24182;&#23558;&#26816;&#26597;&#32467;&#26524;&#20256;&#36882;&#32473; OverflowHandler &#31574;&#30053;&#12290; +</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">validate_range</span> <span class="special">(</span> <span class="identifier">argument_type</span> <span class="identifier">s</span> <span class="special">)</span>
     <span class="special">{</span>
<span class="identifier">OverflowHandler</span><span class="special">()(</span> <span class="identifier">out_of_range</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">)</span> <span class="special">;</span>
     <span class="special">}</span>
@@ -380,21 +408,24 @@
user defined types which require range checking (which is disabled by default when a UDT is involved). The library provides a class: <code class="computeroutput"><span class="identifier">UseInternalRangeChecker</span><span class="special">{}</span></code>; which is a <span class="emphasis"><em>fake</em></span> <code class="computeroutput"><span class="identifier">RangeChecker</span></code> policy used - to signal the converter to use its internal range checking implementation.<br>该策略<span class="bold"><strong>仅</strong></span>对需要 范围检查(当涉及UDT时,缺省是禁用范围检查的)的用户自定义类型作为一个吊钩提 供。本库提供了一个类:<code class="computeroutput"><span class="identifier">UseInternalRangeChecker</span><span class="special">{}</span></code>; 它是一个<span class="emphasis"><em>假的 </em></span> - <code class="computeroutput"><span class="identifier">RangeChecker</span></code> 策略,用于通知转换器使用内部的 范围检查实现。 + to signal the converter to use its internal range checking implementation.<br> + &#35813;&#31574;&#30053;<span class="bold"><strong>&#20165;</strong></span>&#23545;&#38656;&#35201;&#33539;&#22260;&#26816;&#26597;(&#24403;&#28041;&#21450;UDT&#26102;&#65292;&#32570;&#30465;&#26159;&#31105;&#29992;&#33539;&#22260;&#26816;&#26597;&#30340;)&#30340;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#20316;&#20026;&#19968;&#20010;&#21514;&#38057;&#25552;&#20379;&#12290; + &#26412;&#24211;&#25552;&#20379;&#20102;&#19968;&#20010;&#31867;&#65306;<code class="computeroutput"><span class="identifier">UseInternalRangeChecker</span><span class="special">{}</span></code>; &#23427;&#26159;&#19968;&#20010;<span class="emphasis"><em>&#20551;&#30340;</em></span> + <code class="computeroutput"><span class="identifier">RangeChecker</span></code> &#31574;&#30053;&#65292;&#29992;&#20110;&#36890;&#30693;&#36716;&#25442;&#22120;&#20351;&#29992;&#20869;&#37096;&#30340;&#33539;&#22260;&#26816;&#26597;&#23454;&#29616;&#12290;
       </p>
 </div>
 </div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tbody><tr> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2004 -2007 Fernando Luis Cacciola Carballal<p> +<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>)
       </p>
 </div></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="conversion_traits___traits_class.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="improved_numeric_cast__.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/type_requirements_and_user_defined_types_support.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/boost_numericconversion/type_requirements_and_user_defined_types_support.html Mon Mar 22 20:44:11 2010
@@ -1,228 +1,218 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Type Requirements and User-defined-types support</title>
-
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="prev" href="converter___function_object.html" title="converter&lt;&gt; function object"> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;"> <link rel="next" href="bounds___traits_class.html" title="bounds&lt;&gt; traits class">
 </head>
-<body style="color: black; background-color: white;" alink="#0000ff" link="#0000ff" vlink="#840084">
-<table cellpadding="2" width="100%">
-<tbody>
-<tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr>
-</tbody>
-</table>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="converter___function_object.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bounds___traits_class.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<div class="spirit-nav">
+<a accesskey="p" href="converter___function_object.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bounds___traits_class.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both;"><a name="boost_numericconversion.type_requirements_and_user_defined_types_support"></a><a class="link" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support">Type -Requirements and User-defined-types support 类型要求和用户自定义类型支持 </a>
-</h2>
-</div>
-</div>
-</div>
-<div class="toc">
-<dl>
-<dt><span class="section"><a href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements">Type
-Requirements 类型要求</a></span></dt>
-<dt><span class="section"><a href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics">UDT's
-special semantics 用户自定义类型的特殊语义</a></span></dt>
-<dt><span class="section"><a href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies">Special
-Policies 特殊策略</a></span></dt>
-</dl>
-</div>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_numericconversion.type_requirements_and_user_defined_types_support"></a><a class="link" href="type_requirements_and_user_defined_types_support.html" title="Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;"> + Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements">
+      Type Requirements &#31867;&#22411;&#35201;&#27714;</a></span></dt>
+<dt><span class="section"><a href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics"> + UDT's special semantics &#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#30340;&#29305;&#27530;&#35821;&#20041;</a></span></dt> +<dt><span class="section"><a href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies">
+      Special Policies &#29305;&#27530;&#31574;&#30053;</a></span></dt>
+</dl></div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements"></a><a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements" title="Type Requirements">Type Requirements 类型要求</a>
-</h3>
-</div>
-</div>
-</div>
-<p> Both arithmetic (built-in) and user-defined numeric types
-require proper specialization of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code>
-(that is, with (in-class) integral constants).<br>
-算术类型(内建的)和用户自定义的数字类型都要求对 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code>
-(以(类中)的整型常量)进行正确的特化。 </p>
-<p> The library uses <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_specialized</span></code> -to detect whether the type is builtin or user defined, and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_integer</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_signed</span></code> to
-detect whether the type is integer or floating point; and whether it is
-signed/unsigned.<br>
-本库用 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_specialized</span></code> -来检测某个类型是否内建的或用户定义的,用 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_integer</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_signed</span></code>
-来检测某个类型为整数或浮点数;以及是否有符号/无符号。 </p>
-<p> The default <code class="computeroutput"><span class="identifier">Float2IntRounder</span></code> -policies uses unqualified calls to functions <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>; but the
-standard functions are introduced in scope by a using directive:<br>
-缺省的 <code class="computeroutput"><span class="identifier">Float2IntRounder</span></code> -策略以非受限方式调用函数 <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> -和 <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>;而标准函数是通过一个
-using 指令引入到作用域中: </p>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements"></a><a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements" title="Type Requirements &#31867;&#22411;&#35201;&#27714;">
+      Type Requirements &#31867;&#22411;&#35201;&#27714;</a>
+</h3></div></div></div>
+<p>
+ Both arithmetic (built-in) and user-defined numeric types require proper + specialization of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code> + (that is, with (in-class) integral constants).<br> &#31639;&#26415;&#31867;&#22411;(&#20869;&#24314;&#30340;)&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#25968;&#23383;&#31867;&#22411;&#37117;&#35201;&#27714;&#23545; + <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code> + (&#20197;(&#31867;&#20013;)&#30340;&#25972;&#22411;&#24120;&#37327;)&#36827;&#34892;&#27491;&#30830;&#30340;&#29305;&#21270;&#12290;
+      </p>
+<p>
+ The library uses <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_specialized</span></code> to detect whether the type + is builtin or user defined, and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_integer</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_signed</span></code> to detect whether the type is + integer or floating point; and whether it is signed/unsigned.<br> &#26412;&#24211;&#29992; + <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_specialized</span></code> &#26469;&#26816;&#27979;&#26576;&#20010;&#31867;&#22411;&#26159;&#21542;&#20869;&#24314;&#30340;&#25110;&#29992;&#25143;&#23450;&#20041;&#30340;&#65292; + &#29992; <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_integer</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">is_signed</span></code> &#26469;&#26816;&#27979;&#26576;&#20010;&#31867;&#22411;&#20026;&#25972;&#25968;&#25110;&#28014;&#28857;&#25968;&#65307;&#20197;&#21450;&#26159;&#21542;&#26377;&#31526;&#21495;/&#26080;&#31526;&#21495;&#12290;
+      </p>
+<p>
+ The default <code class="computeroutput"><span class="identifier">Float2IntRounder</span></code> + policies uses unqualified calls to functions <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>; but the standard functions are introduced + in scope by a using directive:<br> &#32570;&#30465;&#30340; <code class="computeroutput"><span class="identifier">Float2IntRounder</span></code> + &#31574;&#30053;&#20197;&#38750;&#21463;&#38480;&#26041;&#24335;&#35843;&#29992;&#20989;&#25968; <code class="computeroutput"><span class="identifier">floor</span><span class="special">()</span></code> &#21644; <code class="computeroutput"><span class="identifier">ceil</span><span class="special">()</span></code>&#65307;&#32780;&#26631;&#20934;&#20989;&#25968;&#26159;&#36890;&#36807;&#19968;&#20010; using + &#25351;&#20196;&#24341;&#20837;&#21040;&#20316;&#29992;&#22495;&#20013;&#65306;
+      </p>
<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span> <span class="special">;</span> <span class="keyword">return</span> <span class="identifier">floor</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
 </pre>
-<p> Therefore, for builtin arithmetic types, the std functions
-will be used. User defined types should provide overloaded versions of
-these functions in order to use the default rounder policies. If these
-overloads are defined within a user namespace argument dependent lookup
-(ADL) should find them, but if your compiler has a weak ADL you might
-need to put these functions some place else or write your own rounder
-policy.<br>
-因此,对于内建的算术类型,将使用标准函数。为了使用缺省的舍入策略,用户自定 义类型应该提供这些函数的重载版本。如果这些重载是在一个用户名字空间内定 -义的,参数依赖查找(ADL)会找到它们,但是如果你的编译器的ADL较弱,那么你可能 需要将这些函数放在其它地方,或者编写你自己的舍入策略。 </p> -<p> The default <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code>
-rounder policy needs to determine if the source value is positive or
-not, and for this it evaluates the expression <code class="computeroutput"><span class="identifier">s</span> -<span class="special">&lt;</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="number">0</span><span class="special">)</span></code>. -Therefore, user defined types require a visible <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in order -to use the <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code>
-policy (the default).<br>
-缺省的 <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code> -舍入策略需要判断源数值是否为正,为此它要对表达式 <code class="computeroutput"><span class="identifier">s</span> <span class="special">&lt;</span> -<span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="number">0</span><span class="special">)</span></code> -进行求值。因此,为了使用 <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code> -策略(缺省情况),用户自定义类型需要一个可见的 <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>
-。 </p>
+<p>
+ Therefore, for builtin arithmetic types, the std functions will be used. + User defined types should provide overloaded versions of these functions + in order to use the default rounder policies. If these overloads are defined + within a user namespace argument dependent lookup (ADL) should find them, + but if your compiler has a weak ADL you might need to put these functions + some place else or write your own rounder policy.<br> &#22240;&#27492;&#65292;&#23545;&#20110;&#20869;&#24314;&#30340;&#31639;&#26415;&#31867;&#22411;&#65292;&#23558;&#20351;&#29992;&#26631;&#20934;&#20989;&#25968;&#12290;&#20026;&#20102;&#20351;&#29992;&#32570;&#30465;&#30340;&#33293;&#20837;&#31574;&#30053;&#65292;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#24212;&#35813;&#25552;&#20379;&#36825;&#20123;&#20989;&#25968;&#30340;&#37325;&#36733;&#29256;&#26412;&#12290; + &#22914;&#26524;&#36825;&#20123;&#37325;&#36733;&#26159;&#22312;&#19968;&#20010;&#29992;&#25143;&#21517;&#23383;&#31354;&#38388;&#20869;&#23450;&#20041;&#30340;&#65292;&#21442;&#25968;&#20381;&#36182;&#26597;&#25214;(ADL)&#20250;&#25214;&#21040;&#23427;&#20204;&#65292;&#20294;&#26159;&#22914;&#26524;&#20320;&#30340;&#32534;&#35793;&#22120;&#30340;ADL&#36739;&#24369;&#65292; + &#37027;&#20040;&#20320;&#21487;&#33021;&#38656;&#35201;&#23558;&#36825;&#20123;&#20989;&#25968;&#25918;&#22312;&#20854;&#23427;&#22320;&#26041;&#65292;&#25110;&#32773;&#32534;&#20889;&#20320;&#33258;&#24049;&#30340;&#33293;&#20837;&#31574;&#30053;&#12290;
+      </p>
+<p>
+ The default <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code> + rounder policy needs to determine if the source value is positive or not, + and for this it evaluates the expression <code class="computeroutput"><span class="identifier">s</span> + <span class="special">&lt;</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="number">0</span><span class="special">)</span></code>. Therefore, + user defined types require a visible <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code> in order to use the <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code> policy (the default).<br> &#32570;&#30465;&#30340; + <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code> + &#33293;&#20837;&#31574;&#30053;&#38656;&#35201;&#21028;&#26029;&#28304;&#25968;&#20540;&#26159;&#21542;&#20026;&#27491;&#65292;&#20026;&#27492;&#23427;&#35201;&#23545;&#34920;&#36798;&#24335; + <code class="computeroutput"><span class="identifier">s</span> <span class="special">&lt;</span> + <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">&gt;(</span><span class="number">0</span><span class="special">)</span></code> &#36827;&#34892;&#27714;&#20540;&#12290; + &#22240;&#27492;&#65292;&#20026;&#20102;&#20351;&#29992; <code class="computeroutput"><span class="identifier">Trunc</span><span class="special">&lt;&gt;</span></code> &#31574;&#30053;(&#32570;&#30465;&#24773;&#20917;)&#65292;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#38656;&#35201;&#19968;&#20010;&#21487;&#35265;&#30340; + <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;</span></code>
+        &#12290;
+      </p>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics"></a><a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics" title="UDT's special semantics">UDT's special semantics
-用户自定义类型的特殊语义</a>
-</h3>
-</div>
-</div>
-</div>
-<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.conversion_traits"></a> -<h5><a name="id2645593"></a> <a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.conversion_traits">Conversion
-Traits 转换 Traits</a> </h5>
-<p> If a User Defined Type is involved in a conversion, it is <span class="emphasis"><em>assumed</em></span> -that the UDT has <a class="link" href="definitions.html#numeric_conversion_definitions_range">wider
-range</a> than any built-in type, and consequently the values of
-some <code class="computeroutput"><span class="identifier">converter_traits</span><span class="special">&lt;&gt;</span></code>
-members are hardwired regardless of the reality. The following table
-summarizes this:<br>
-在转换中,如果涉及到用户自定义类型,将 <span class="emphasis"><em>假定 </em></span> -UDT 具有比任意内建类型 <a class="link" href="definitions.html#numeric_conversion_definitions_range">更 -广的范围</a>,因此不管事实如何,有些 <code class="computeroutput"><span class="identifier">converter_traits</span><span class="special">&lt;&gt;</span></code>
-成员就是硬性规定的。总结如下表: </p>
-<div class="itemizedlist">
-<ul type="disc">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics"></a><a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics" title="UDT's special semantics &#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#30340;&#29305;&#27530;&#35821;&#20041;"> + UDT's special semantics &#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#30340;&#29305;&#27530;&#35821;&#20041;</a>
+</h3></div></div></div>
+<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.conversion_traits_______traits"></a><h5>
+<a name="id4875011"></a>
+ <a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.conversion_traits_______traits">Conversion
+        Traits &#36716;&#25442;Traits</a>
+      </h5>
+<p>
+ If a User Defined Type is involved in a conversion, it is <span class="emphasis"><em>assumed</em></span> + that the UDT has <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">wider + range</a> than any built-in type, and consequently the values of some + <code class="computeroutput"><span class="identifier">converter_traits</span><span class="special">&lt;&gt;</span></code> + members are hardwired regardless of the reality. The following table summarizes + this:<br> &#22312;&#36716;&#25442;&#20013;&#65292;&#22914;&#26524;&#28041;&#21450;&#21040;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#65292;&#23558; <span class="emphasis"><em>&#20551;&#23450;</em></span> + UDT &#20855;&#26377;&#27604;&#20219;&#24847;&#20869;&#24314;&#31867;&#22411; <a class="link" href="definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">&#26356;&#24191;&#30340;&#33539;&#22260;</a>&#65292;&#22240;&#27492;&#19981;&#31649;&#20107;&#23454;&#22914;&#20309;&#65292; + &#26377;&#20123; <code class="computeroutput"><span class="identifier">converter_traits</span><span class="special">&lt;&gt;</span></code> + &#25104;&#21592;&#23601;&#26159;&#30828;&#24615;&#35268;&#23450;&#30340;&#12290;&#24635;&#32467;&#22914;&#19979;&#34920;&#65306;
+      </p>
+<div class="itemizedlist"><ul type="disc">
 <li>
-<code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span> and <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>built-in</em></span><br><code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span> 且 <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>built-in</em></span>
-<div class="itemizedlist">
-<ul type="circle">
+<code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span> + and <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>built-in</em></span><div class="itemizedlist"><ul type="circle"> <li><code class="computeroutput"><span class="identifier">subranged</span><span class="special">=</span><span class="keyword">false</span></code></li> <li><code class="computeroutput"><span class="identifier">supertype</span><span class="special">=</span><span class="identifier">Target</span></code></li> <li><code class="computeroutput"><span class="identifier">subtype</span><span class="special">=</span><span class="identifier">Source</span></code></li>
-</ul>
-</div>
+</ul></div>
 </li>
 <li>
<code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>built-in</em></span> -and <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span><span class="emphasis"><em></em></span><br><code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>built-in</em></span> 且 <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span><span class="emphasis"><em></em></span>
-<div class="itemizedlist">
-<ul type="circle">
+ and <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span><div class="itemizedlist"><ul type="circle"> <li><code class="computeroutput"><span class="identifier">subranged</span><span class="special">=</span><span class="keyword">true</span></code></li> <li><code class="computeroutput"><span class="identifier">supertype</span><span class="special">=</span><span class="identifier">Source</span></code></li> <li><code class="computeroutput"><span class="identifier">subtype</span><span class="special">=</span><span class="identifier">Target</span></code></li>
-</ul>
-</div>
+</ul></div>
 </li>
 <li>
-<code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span> and <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span><span class="emphasis"><em></em></span><br><code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span> 且 <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span>
-<div class="itemizedlist">
-<ul type="circle">
+<code class="computeroutput"><span class="identifier">Target</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span> + and <code class="computeroutput"><span class="identifier">Source</span><span class="special">=</span></code><span class="emphasis"><em>UDT</em></span><div class="itemizedlist"><ul type="circle"> <li><code class="computeroutput"><span class="identifier">subranged</span><span class="special">=</span><span class="keyword">false</span></code></li> <li><code class="computeroutput"><span class="identifier">supertype</span><span class="special">=</span><span class="identifier">Target</span></code></li> <li><code class="computeroutput"><span class="identifier">subtype</span><span class="special">=</span><span class="identifier">Source</span></code></li>
-</ul>
-</div>
+</ul></div>
 </li>
-</ul>
+</ul></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">Traits</span></code> member <code class="computeroutput"><span class="identifier">udt_mixture</span></code> can be used to detect whether + a UDT is involved and to infer the validity of the other members as shown + above.<br> <code class="computeroutput"><span class="identifier">Traits</span></code> &#25104;&#21592; + <code class="computeroutput"><span class="identifier">udt_mixture</span></code> &#21487;&#29992;&#20110;&#26816;&#27979;&#26159;&#21542;&#28041;&#21450;&#26576;&#20010; + UDT &#24182;&#22914;&#19978;&#25152;&#31034;&#25512;&#26029;&#20854;&#23427;&#25104;&#21592;&#30340;&#26377;&#25928;&#24615;&#12290;
+      </p>
+<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.range_checking_____________"></a><h5>
+<a name="id4875496"></a>
+ <a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.range_checking_____________">Range
+        Checking &#33539;&#22260;&#26816;&#26597;</a>
+      </h5>
+<p>
+ Because User Defined Numeric Types might have peculiar ranges (such as an + unbounded range), this library does not attempt to supply a meaningful range + checking logic when UDTs are involved in a conversion. Therefore, if either + Target or Source are not built-in types, the bundled range checking of the + <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> + function object is automatically disabled. However, it is possible to supply + a user-defined range-checker. See <a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies" title="Special Policies &#29305;&#27530;&#31574;&#30053;">Special + Policies</a><br> &#22240;&#20026;&#29992;&#25143;&#33258;&#23450;&#20041;&#25968;&#23383;&#31867;&#22411;&#21487;&#33021;&#20855;&#26377;&#29305;&#27530;&#30340;&#33539;&#22260;(&#22914;&#19968;&#20010;&#26080;&#30028;&#30340;&#33539;&#22260;)&#65292;&#22240;&#27492;&#26412;&#24211;&#22312;&#36716;&#25442;&#28041;&#21450;&#26576;&#20010;UDT&#26102;&#19981;&#25552;&#20379;&#19968;&#20010;&#26377;&#24847;&#20041;&#30340;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#12290; + &#22240;&#27492;&#65292;&#22914;&#26524;&#30446;&#26631;&#31867;&#22411;&#25110;&#28304;&#31867;&#22411;&#20043;&#19968;&#19981;&#26159;&#20869;&#24314;&#31867;&#22411;&#65292;&#21017; <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> + &#20989;&#25968;&#23545;&#35937;&#25152;&#32465;&#23450;&#30340;&#33539;&#22260;&#26816;&#26597;&#23601;&#20250;&#33258;&#21160;&#31105;&#29992;&#12290; &#19981;&#36807;&#65292;&#20320;&#21487;&#20197;&#25552;&#20379;&#19968;&#20010;&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#33539;&#22260;&#26816;&#26597;&#22120;&#12290;&#35831;&#35265; + <a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies" title="Special Policies &#29305;&#27530;&#31574;&#30053;">&#29305;&#27530;&#31574;&#30053;</a>&#12290;
+      </p>
 </div>
-<p> The <code class="computeroutput"><span class="identifier">Traits</span></code> member <code class="computeroutput"><span class="identifier">udt_mixture</span></code>
-can be used to detect whether a UDT is involved and to infer the
-validity of the other members as shown above.<br><code class="computeroutput"><span class="identifier">Traits</span></code> 成员 <code class="computeroutput"><span class="identifier">udt_mixture</span></code>
-可用于检测是否涉及某个 UDT 并如上所示推断其它成员的有效性。 </p>
-<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.range_checking"></a> -<h5><a name="id2645983"></a> <a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics.range_checking">Range -Checking 范围检查</a></h5><p> Because User Defined Numeric Types might have peculiar ranges
-(such as an unbounded range), this library does not attempt to supply a
-meaningful range checking logic when UDTs are involved in a conversion.
-Therefore, if either Target or Source are not built-in types, the
-bundled range checking of the <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code>
-function object is automatically disabled. However, it is possible to
-supply a user-defined range-checker. See <a class="link" href="type_requirements_and_user_defined_types_support.html#numeric_conversion_requirements_hooks">Special -Policies</a><br>因为用户自定义数字类型可能具有特殊的范围(如一个无界的范围 ),因此本库在转换涉及某个UDT时不提供一个有意义的范围检查逻辑。因此,如果目标 类型或源类型之一不是内建类型,则 <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> -函数对象所绑定的范围检查就会自动禁用。不过,你可以提供一个用户自定义的范围 检查器。请见 <a class="link" href="type_requirements_and_user_defined_types_support.html#numeric_conversion_requirements_hooks">特 殊策略</a>。<a class="link" href="type_requirements_and_user_defined_types_support.html#numeric_conversion_requirements_hooks"></a> </p>
-</div>
-<a name="numeric_conversion_requirements_hooks"></a>
-<p> </p>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h3 class="title"><a name="boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies"></a><a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies" title="Special Policies">Special Policies 特殊策略</a>
-</h3>
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies"></a><a class="link" href="type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies" title="Special Policies &#29305;&#27530;&#31574;&#30053;">
+      Special Policies &#29305;&#27530;&#31574;&#30053;</a>
+</h3></div></div></div>
+<p>
+ There are two components of the <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> class that might require special + behavior if User Defined Numeric Types are involved: the Range Checking and + the Raw Conversion.<br> &#22914;&#26524;&#28041;&#21450;&#21040;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#65292;<code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code> + &#31867;&#20013;&#26377;&#20004;&#20010;&#32452;&#20214;&#21487;&#33021;&#38656;&#35201;&#29305;&#27530;&#30340;&#34892;&#20026;&#65306;&#33539;&#22260;&#26816;&#26597;&#21644;&#21407;&#22987;&#36716;&#25442;&#12290;
+      </p>
+<p>
+ When both Target and Source are built-in types, the converter class uses + an internal range checking logic which is optimized and customized for the + combined properties of the types.<br> &#24403;&#30446;&#26631;&#31867;&#22411;&#21644;&#28304;&#31867;&#22411;&#37117;&#26159;&#20869;&#24314;&#31867;&#22411;&#26102;&#65292;&#36716;&#25442;&#22120;&#31867;&#20351;&#29992;&#19968;&#20010;&#20869;&#37096;&#30340;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#65292;&#35813;&#36923;&#36753;&#38024;&#23545;&#31867;&#22411;&#30340;&#32452;&#21512;&#29305;&#24615;&#36827;&#34892;&#20102;&#20248;&#21270;&#21644;&#23450;&#21046;&#12290;
+      </p>
+<p>
+ However, this internal logic is disabled when either type is User Defined. + In this case, the user can specify an <span class="emphasis"><em>external</em></span> range + checking policy which will be used in place of the internal code. See <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a> + policy for details.<br> &#20294;&#26159;&#65292;&#24403;&#26377;&#20854;&#20013;&#19968;&#20010;&#31867;&#22411;&#26159;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#26102;&#65292;&#35813;&#20869;&#37096;&#36923;&#36753;&#23601;&#20250;&#34987;&#31105;&#29992;&#12290;&#36825;&#31181;&#24773;&#20917;&#19979;&#65292;&#29992;&#25143;&#21487;&#20197;&#25351;&#23450;&#19968;&#20010; + <span class="emphasis"><em>&#22806;&#37096;</em></span> &#30340;&#33539;&#22260;&#26816;&#26597;&#31574;&#30053;&#65292;&#29992;&#20110;&#26367;&#25442;&#20869;&#37096;&#20195;&#30721;&#12290; + &#20855;&#20307;&#35831;&#35265; <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a>
+        &#31574;&#30053;&#12290;
+      </p>
+<p>
+ The converter class performs the actual conversion using a Raw Converter + policy. The default raw converter simply performs a <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">source</span><span class="special">)</span></code>.<br> &#36716;&#25442;&#22120;&#31867;&#20351;&#29992;&#19968;&#20010;&#21407;&#22987;&#36716;&#25442;&#22120;&#31574;&#30053;&#25191;&#34892;&#23454;&#38469;&#30340;&#36716;&#25442;&#12290;&#32570;&#30465;&#30340;&#21407;&#22987;&#36716;&#25442;&#22120;&#21482;&#26159;&#25191;&#34892;&#19968;&#20010; + <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">source</span><span class="special">)</span></code>.
+      </p>
+<p>
+ However, if the a UDT is involved, the <code class="computeroutput"><span class="keyword">static_cast</span></code> + might not work. In this case, the user can implement and pass a different + raw converter policy. See <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">RawConverter</a> + policy for details<br> &#20294;&#26159;&#65292;&#22914;&#26524;&#28041;&#21450;&#21040; UDT&#65292;<code class="computeroutput"><span class="keyword">static_cast</span></code> + &#20063;&#35768;&#23601;&#19981;&#33021;&#22863;&#25928;&#20102;&#12290;&#36825;&#31181;&#24773;&#20917;&#19979;&#65292;&#29992;&#25143;&#21487;&#20197;&#23454;&#29616;&#19968;&#20010;&#19981;&#21516;&#30340;&#21407;&#22987;&#36716;&#25442;&#22120;&#31574;&#30053;&#24182;&#20256;&#20837;&#23427;&#12290;&#20855;&#20307;&#35831;&#35265; + <a class="link" href="numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">RawConverter</a>
+        &#31574;&#30053;&#12290;
+      </p>
 </div>
 </div>
-</div>
-<p> There are two components of the <code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code>
-class that might require special behavior if User Defined Numeric Types
-are involved: the Range Checking and the Raw Conversion.<br>如果涉及到用户 自定义类型,<code class="computeroutput"><span class="identifier">converter</span><span class="special">&lt;&gt;</span></code>
-类中有两个组件可能需要特殊的行为:范围检查和原始转换。 </p>
-<p> When both Target and Source are built-in types, the converter
-class uses an internal range checking logic which is optimized and
-customized for the combined properties of the types.<br>当目标类型和源类型 都是内建类型时,转换器类使用一个内部的范围检查逻辑,该逻辑针对类型的组合特性 进行了优化和定制。 </p>
-
-<p> However, this internal logic is disabled when either type is
-User Defined. In this case, the user can specify an <span class="emphasis"><em>external</em></span>
-range checking policy which will be used in place of the internal code.
-See <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> -policy for details.<br>但是,当有其中一个类型是用户自定义类型时,该内部逻辑 就会被禁用。这种情况下,用户可以指定一个 <span class="emphasis"><em>外部 </em></span> -的范围检查策略,用于替换内部代码。具体请见 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> 策略。 </p>
-
-<p> The converter class performs the actual conversion using a
-Raw Converter policy. The default raw converter simply performs a <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">source</span><span class="special">)</span></code>.<br>转换器类使用一个原始转换器策略执行实际的 转换。缺省的原始转换器只是执行一个 <code class="computeroutput"><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">source</span><span class="special">)</span></code>. </p> -<p> However, if the a UDT is involved, the <code class="computeroutput"><span class="keyword">static_cast</span></code>
-might not work. In this case, the user can implement and pass a
-different raw converter policy. See <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_raw_converter">RawConverter</a> -policy for details<br>但是,如果涉及到 UDT,<code class="computeroutput"><span class="keyword">static_cast</span></code> -也许就不能奏效了。这种情况下,用户可以实现一个不同的原始转换器策略并传入 它。具体请见 <a class="link" href="numeric_converter_policy_classes.html#numeric_conversion_policy_raw_converter">RawConverter</a> 策略。 </p>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%">
-<tbody>
-<tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right">
-<div class="copyright-footer">Copyright © 2004 -2007
-Fernando Luis Cacciola Carballal
-<p> Distributed under the Boost Software License, Version
-1.0. (See accompanying 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>)
-</p>
-</div>
-</td>
-</tr>
-</tbody>
-</table>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + 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>)
+      </p>
+</div></td>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="converter___function_object.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bounds___traits_class.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<div class="spirit-nav">
+<a accesskey="p" href="converter___function_object.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bounds___traits_class.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/index.html Tue Nov 11 23:43:49 2008 +++ /trunk/libs/numeric/conversion/doc/html/index.html Mon Mar 22 20:44:11 2010
@@ -1,245 +1,202 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter&nbsp;1.&nbsp;Boost.NumericConversion</title>
-
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;Boost.NumericConversion</title>
 <link rel="stylesheet" href="boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="next" href="boost_numericconversion/definitions.html" title="Definitions"></head> -<body style="color: black; background-color: white;" alink="#0000ff" link="#0000ff" vlink="#840084">
-<table cellpadding="2" width="100%">
-<tbody>
-<tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../boost.png" height="86" width="277"></td> +<link rel="start" href="index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="next" href="boost_numericconversion/definitions.html" title="Definitions &#23450;&#20041;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../index.html">Home</a></td>
 <td align="center"><a href="../../../../libraries.htm">Libraries</a></td>
-<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../more/index.htm">More</a></td>
-</tr>
-</tbody>
-</table>
+</tr></table>
 <hr>
<div class="spirit-nav"><a accesskey="n" href="boost_numericconversion/definitions.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a></div>
 <div class="chapter" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title"><a name="numeric_conversion"></a>Chapter&nbsp;1.&nbsp;Boost.NumericConversion</h2>
-</div>
-<div>
-<div class="author">
-<h3 class="author"><span class="firstname">Fernando
-Luis</span> <span class="surname">Cacciola Carballal</span>
-</h3>
-</div>
-</div>
-<div>
-<p class="copyright">Copyright © 2004 -2007 Fernando Luis
-Cacciola Carballal</p>
-</div>
-<div>
-<div class="legalnotice"><a name="id2625902"></a>
-<p> Distributed under the Boost Software License, Version 1.0.
-(See accompanying 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>)
-</p>
-</div>
-</div>
-</div>
-</div>
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="numeric_conversion"></a>Chapter&#160;1.&#160;Boost.NumericConversion</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Fernando Luis</span> <span class="surname">Cacciola Carballal</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal</p></div>
+<div><div class="legalnotice">
+<a name="id4850103"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying + 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>)
+      </p>
+</div></div>
+</div></div>
 <div class="toc">
-<p><b>Table of Contents 目录</b></p>
+<p><b>Table of Contents</b></p>
 <dl>
-<dt><span class="section"><a href="index.html#numeric_conversion.overview">Overview 概览</a></span></dt> -<dt><span class="section"><a href="boost_numericconversion/definitions.html">Definitions
-定义</a></span></dt>
-<dd>
-<dl>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.introduction">Introduction
-简介</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.types_and_values">Types
-and Values 类型与值</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.c___arithmetic_types">C++
-Arithmetic Types &nbsp;C++算术类型</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types">Numeric
-Types 数字类型</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.range_and_precision">Range
-and Precision 范围与精度</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations">Exact, -Correctly Rounded and Out-Of-Range Representations 精确的、适当舍入的和超出 范围的表示法</a></span></dt> -<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.standard__numeric__conversions">Standard
-(numeric) Conversions 标准的(数字)转换</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype">Subranged -Conversion Direction, Subtype and Supertype 子范围转换方向、子类型和父类型 </a></span></dt>
-</dl>
-</dd>
-<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html">converter&lt;&gt;
-function object &nbsp;converter&lt;&gt; 函数对象</a></span></dt>
-<dd>
-<dl>
-<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.synopsis">Synopsis
-摘要</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.template_parameters">Template
-parameters 模板参数</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.member_functions">Member
-functions 成员函数</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic">Range
-Checking Logic 范围检查逻辑</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.examples">Examples
-例子</a></span></dt>
-</dl>
-</dd>
-<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html">Type -Requirements and User-defined-types support 类型要求和用户自定义类型支持 </a></span></dt>
-<dd>
-<dl>
-<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements">Type
-Requirements 类型要求</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics">UDT's
-special semantics 用户自定义类型的特殊语义</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies">Special
-Policies 特殊策略</a></span></dt>
-</dl>
-</dd>
+<dt><span class="section"><a href="index.html#numeric_conversion.overview"> Overview &#27010;&#35272;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/definitions.html"> Definitions &#23450;&#20041;</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.introduction"> Introduction
+      &#31616;&#20171;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.types_and_values">
+      Types and Values &#31867;&#22411;&#19982;&#20540;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.c___arithmetic_types"> + C++ Arithmetic Types C++&#31639;&#26415;&#31867;&#22411;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types"> Numeric
+      Types &#25968;&#23383;&#31867;&#22411;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.range_and_precision"> + Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.exact__correctly_rounded_and_out_of_range_representations"> + Exact, Correctly Rounded and Out-Of-Range Representations &#31934;&#30830;&#30340;&#12289;&#36866;&#24403;&#33293;&#20837;&#30340;&#21644;&#36229;&#20986;&#33539;&#22260;&#30340;&#34920;&#31034;&#27861;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.standard__numeric__conversions"> + Standard (numeric) Conversions &#26631;&#20934;&#30340;(&#25968;&#23383;)&#36716;&#25442;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.subranged_conversion_direction__subtype_and_supertype"> + Subranged Conversion Direction, Subtype and Supertype &#23376;&#33539;&#22260;&#36716;&#25442;&#26041;&#21521;&#12289;&#23376;&#31867;&#22411;&#21644;&#29238;&#31867;&#22411;</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html"> converter&lt;&gt; + function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.synopsis">
+      Synopsis &#25688;&#35201;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.template_parameters">
+      Template parameters &#27169;&#26495;&#21442;&#25968;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.member_functions">
+      Member functions &#25104;&#21592;&#20989;&#25968;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.range_checking_logic"> + Range Checking Logic &#33539;&#22260;&#26816;&#26597;&#36923;&#36753;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/converter___function_object.html#boost_numericconversion.converter___function_object.examples">
+      Examples &#20363;&#23376;</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html"> + Type Requirements and User-defined-types support &#31867;&#22411;&#35201;&#27714;&#21644;&#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#25903;&#25345;</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.type_requirements">
+      Type Requirements &#31867;&#22411;&#35201;&#27714;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.udt_s_special_semantics"> + UDT's special semantics &#29992;&#25143;&#33258;&#23450;&#20041;&#31867;&#22411;&#30340;&#29305;&#27530;&#35821;&#20041;</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/type_requirements_and_user_defined_types_support.html#boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies">
+      Special Policies &#29305;&#27530;&#31574;&#30053;</a></span></dt>
+</dl></dd>
<dt><span class="section"><a href="boost_numericconversion/bounds___traits_class.html">bounds&lt;&gt;
-traits class &nbsp;bounds&lt;&gt; traits 类</a></span></dt>
-<dd>
-<dl>
-<dt><span class="section"><a href="boost_numericconversion/bounds___traits_class.html#boost_numericconversion.bounds___traits_class.introduction">Introduction
-简介</a></span></dt>
+    traits class</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_numericconversion/bounds___traits_class.html#boost_numericconversion.bounds___traits_class.introduction">
+      Introduction &#31616;&#20171;</a></span></dt>
<dt><span class="section"><a href="boost_numericconversion/bounds___traits_class.html#boost_numericconversion.bounds___traits_class.traits_class_bounds_n_">traits
-class bounds&lt;N&gt; &nbsp;traits 类 bounds&lt;N&gt;</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/bounds___traits_class.html#boost_numericconversion.bounds___traits_class.examples">Examples
-例子</a></span></dt>
-</dl>
-</dd>
+      class bounds&lt;N&gt;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/bounds___traits_class.html#boost_numericconversion.bounds___traits_class.examples">
+      Examples &#20363;&#23376;</a></span></dt>
+</dl></dd>
<dt><span class="section"><a href="boost_numericconversion/conversion_traits___traits_class.html">conversion_traits&lt;&gt;
-traits class &nbsp;conversion_traits&lt;&gt; traits 类</a></span></dt>
-<dd>
-<dl>
-<dt><span class="section"><a href="boost_numericconversion/conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types">Types
-类型</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.examples">Examples
-例子</a></span></dt>
-</dl>
-</dd>
-<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html">Numeric
-Converter Policy Classes 数字转换器策略类</a></span></dt>
-<dd>
-<dl>
+    traits class</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_numericconversion/conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.types">
+      Types &#31867;&#22411;</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/conversion_traits___traits_class.html#boost_numericconversion.conversion_traits___traits_class.examples">
+      Examples &#20363;&#23376;</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html"> + Numeric Converter Policy Classes &#25968;&#23383;&#36716;&#25442;&#22120;&#31574;&#30053;&#31867;</a></span></dt>
+<dd><dl>
<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.enum_range_check_result">enum
-range_check_result</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler">Policy
-OverflowHandler 策略 OverflowHandler</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder">Policy
-Float2IntRounder 策略 Float2IntRounder</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter">Policy
-RawConverter 策略 RawConverter</a></span></dt>
-<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker">Policy
-UserRangeChecker 策略 UserRangeChecker</a></span></dt>
-</dl>
-</dd>
-<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html">Improved
-numeric_cast&lt;&gt; 改进的 numeric_cast&lt;&gt;</a></span></dt>
-<dd>
-<dl>
-<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.introduction">Introduction
-简介</a></span></dt>
+      range_check_result</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler"> + Policy OverflowHandler &#31574;&#30053;OverflowHandler</a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder"> + Policy Float2IntRounder &#31574;&#30053;Float2IntRounder </a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter">
+      Policy RawConverter &#31574;&#30053;RawConverter</a></span></dt>
+<dt><span class="section"><a href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker"> + Policy UserRangeChecker &#31574;&#30053;UserRangeChecker </a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html"> Improved + numeric_cast&lt;&gt; &#25913;&#36827;&#30340;numeric_cast&lt;&gt;</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.introduction">
+      Introduction &#31616;&#20171;</a></span></dt>
<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.numeric_cast">numeric_cast</a></span></dt> -<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.examples">Examples
-例子</a></span></dt>
-</dl>
-</dd>
-<dt><span class="section"><a href="numeric_conversion/history_and_acknowledgments.html">History
-and Acknowledgments 历史与鸣谢</a></span></dt>
-<dt><span class="section"><a href="numeric_conversion/bibliography.html">Bibliography 参考书目 </a></span></dt> +<dt><span class="section"><a href="boost_numericconversion/improved_numeric_cast__.html#boost_numericconversion.improved_numeric_cast__.examples">
+      Examples &#20363;&#23376;</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="numeric_conversion/history_and_acknowledgments.html"> History + and Acknowledgments &#21382;&#21490;&#21644;&#40483;&#35874;</a></span></dt> +<dt><span class="section"><a href="numeric_conversion/bibliography.html"> Bibliography &#21442;&#32771;&#20070;&#30446;</a></span></dt>
 </dl>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both;"><a name="numeric_conversion.overview"></a><a class="link" href="index.html#numeric_conversion.overview" title="Overview">Overview 概览 </a>
-</h2>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="numeric_conversion.overview"></a><a class="link" href="index.html#numeric_conversion.overview" title="Overview &#27010;&#35272;"> Overview &#27010;&#35272;</a>
+</h2></div></div></div>
+<p>
+ The Boost Numeric Conversion library is a collection of tools to describe and + perform conversions between values of different <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">numeric + types</a>.<br> Boost Numeric Conversion &#24211;&#26159;&#19968;&#32452;&#29992;&#20110;&#25551;&#36848;&#21644;&#25191;&#34892;&#19981;&#21516; + <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">&#25968;&#23383;&#31867;&#22411;</a>
+      &#38388;&#30340;&#36716;&#25442;&#30340;&#24037;&#20855;&#12290;
+    </p>
+<p>
+ The library includes a special alternative for a subset of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code>, the <a class="link" href="boost_numericconversion/bounds___traits_class.html" title="bounds&lt;&gt; traits class">bounds&lt;&gt;</a> + traits class, which provides a consistent way to obtain the <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">boundary</a> + values for the <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">range</a> + of a numeric type.<br> &#26412;&#24211;&#21253;&#21547;&#20102; <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code> &#30340;&#19968;&#20010;&#23376;&#38598;&#30340;&#29305;&#27530;&#26367;&#20195;&#29289;&#65292;<a class="link" href="boost_numericconversion/bounds___traits_class.html" title="bounds&lt;&gt; traits class">bounds&lt;&gt;</a> + traits &#31867;&#65292; &#23427;&#25552;&#20379;&#20102;&#19968;&#33268;&#30340;&#26041;&#24335;&#26469;&#33719;&#24471;&#19968;&#20010;&#25968;&#23383;&#31867;&#22411;&#30340; <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">&#33539;&#22260;</a> + &#30340; <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.range_and_precision" title="Range and Precision &#33539;&#22260;&#19982;&#31934;&#24230;">&#36793;&#30028;</a>
+      &#20540;&#12290;
+    </p>
+<p>
+ It also includes a set of <a class="link" href="boost_numericconversion/conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class">trait + classes</a> which describes the compile-time properties of a conversion + from a source to a target numeric type. Both <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.c___arithmetic_types" title="C++ Arithmetic Types C++&#31639;&#26415;&#31867;&#22411;">arithmetic</a> + and <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">user-defined + numeric types</a> can be used.<br> &#23427;&#36824;&#21253;&#25324;&#20102;&#19968;&#32452; <a class="link" href="boost_numericconversion/conversion_traits___traits_class.html" title="conversion_traits&lt;&gt; traits class">trait + &#31867;</a>&#65292; &#29992;&#20110;&#25551;&#36848;&#19968;&#20010;&#20174;&#28304;&#25968;&#23383;&#31867;&#22411;&#21040;&#30446;&#26631;&#25968;&#23383;&#31867;&#22411;&#30340;&#36716;&#25442;&#30340;&#19968;&#20123;&#32534;&#35793;&#26399;&#23646;&#24615;&#12290;<a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.c___arithmetic_types" title="C++ Arithmetic Types C++&#31639;&#26415;&#31867;&#22411;">&#31639;&#26415;&#31867;&#22411;</a> + &#21644; <a class="link" href="boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types" title="Numeric Types &#25968;&#23383;&#31867;&#22411;">&#29992;&#25143;&#33258;&#23450;&#20041;&#30340;&#25968;&#23383;&#31867;&#22411;</a>
+      &#22343;&#21487;&#20351;&#29992;&#12290;
+    </p>
+<p>
+ A policy-based <a class="link" href="boost_numericconversion/converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">converter</a> + object which uses <code class="computeroutput"><span class="identifier">conversion_traits</span></code> + to select an optimized implementation is supplied. Such implementation uses + an optimal range checking code suitable for the source/target combination.<br> + &#19968;&#20010;&#22522;&#20110;&#31574;&#30053;&#30340; <a class="link" href="boost_numericconversion/converter___function_object.html" title="converter&lt;&gt; function object converter&lt;&gt;&#20989;&#25968;&#23545;&#35937;">&#36716;&#25442;&#22120;</a> + &#23545;&#35937;&#65292;&#25552;&#20379;&#20102;&#20351;&#29992; <code class="computeroutput"><span class="identifier">conversion_traits</span></code> + &#26469;&#36873;&#25321;&#20248;&#21270;&#30340;&#23454;&#29616;&#12290; &#35813;&#23454;&#29616;&#20351;&#29992;&#19968;&#20010;&#20248;&#21270;&#30340;&#36866;&#29992;&#20110;&#28304;/&#30446;&#26631;&#32452;&#21512;&#30340;&#33539;&#22260;&#26816;&#26597;&#20195;&#30721;&#12290;
+    </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ The converter's out-of-range behavior can be customized via an <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler" title="Policy OverflowHandler &#31574;&#30053;OverflowHandler">OverflowHandler</a> + policy.<br> &#36716;&#25442;&#22120;&#30340;&#28322;&#20986;&#34892;&#20026;&#21487;&#20197;&#36890;&#36807; <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_overflowhandler" title="Policy OverflowHandler &#31574;&#30053;OverflowHandler">OverflowHandler</a>
+        &#31574;&#30053;&#26469;&#23450;&#21046;&#12290;
+      </li>
+<li>
+ For floating-point to integral conversions, the rounding mode can be selected + via the <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder" title="Policy Float2IntRounder &#31574;&#30053;Float2IntRounder">Float2IntRounder</a> + policy.<br> &#23545;&#20110;&#28014;&#28857;&#25968;&#21040;&#25972;&#25968;&#30340;&#36716;&#25442;&#65292;&#33293;&#20837;&#30340;&#27169;&#24335;&#21487;&#20197;&#36890;&#36807; + <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_float2introunder" title="Policy Float2IntRounder &#31574;&#30053;Float2IntRounder">Float2IntRounder</a>
+        &#31574;&#30053;&#26469;&#36873;&#25321;&#12290;
+      </li>
+<li>
+ A custom low-level conversion routine (for UDTs for instance) can be passed + via a <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">RawConverter</a> + policy.<br> &#23450;&#21046;&#30340;&#20302;&#32423;&#36716;&#25442;&#31243;&#24207;(&#22914;&#29992;&#20110;UDT)&#21487;&#36890;&#36807; <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter" title="Policy RawConverter &#31574;&#30053;RawConverter">RawConverter</a>
+        &#31574;&#30053;&#20256;&#20837;&#12290;
+      </li>
+<li>
+ The optimized automatic range-checking logic can be overridden via a <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a> + policy.<br> &#20248;&#21270;&#30340;&#33258;&#21160;&#33539;&#22260;&#26816;&#26597;&#36923;&#36753;&#21487;&#36890;&#36807; <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker" title="Policy UserRangeChecker &#31574;&#30053;UserRangeChecker">UserRangeChecker</a>
+        &#31574;&#30053;&#36827;&#34892;&#37325;&#36733;&#12290;
+      </li>
+</ul></div>
 </div>
 </div>
-</div>
-<p> The Boost Numeric Conversion library is a collection of tools
-to describe and perform conversions between values of different <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_numeric_types">numeric
-types</a>.<br>
-Boost Numeric Conversion 库是一组用于描述和执行不同 <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_numeric_types">数
-字类型</a>&nbsp;间的转换的工具。 </p>
-<p> The library includes a special alternative for a subset of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code>, -the <a class="link" href="index.html#numeric_conversion_bounds">bounds&lt;&gt;</a> -traits class, which provides a consistent way to obtain the <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_range">boundary</a> -values for the <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_range">range</a>
-of a numeric type.<br>
-本库包含了 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;&gt;</span></code> -的一个子集的特殊替代物,<a class="link" href="index.html#numeric_conversion_bounds">bounds&lt;&gt;</a> -traits 类,它提供了一致的方式来获得一个数字类型的 <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_range">范 -围</a> 的 <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_range">边
-界</a> 值。
-</p>
-<p> It also includes a set of <a class="link" href="index.html#numeric_conversion_traits">trait classes</a>
-which describes the compile-time properties of a conversion from a
-source to a target numeric type. Both <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_cpp_arithmetic_types">arithmetic</a> -and <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_numeric_types">user-defined
-numeric types</a> can be used.<br>
-它还包括了一组 <a class="link" href="index.html#numeric_conversion_traits">trait 类</a>, -用于描述一个从源数字类型到目标数字类型的转换的一些编译期属性。<a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_cpp_arithmetic_types">算 -术类型</a> 和 <a class="link" href="boost_numericconversion/definitions.html#numeric_conversion_definitions_numeric_types">用
-户自定义的数字类型</a> 均可使用。 </p>
-<p> A policy-based <a class="link" href="index.html#numeric_conversion_converter">converter</a> -object which uses <code class="computeroutput"><span class="identifier">conversion_traits</span></code>
-to select an optimized implementation is supplied. Such implementation
-uses an optimal range checking code suitable for the source/target
-combination.<br>
-一个基于策略的 <a class="link" href="index.html#numeric_conversion_converter">转换器</a> -对象,提供了使用 <code class="computeroutput"><span class="identifier">conversion_traits</span></code> -来选择优化的实现。该实现使用一个优化的适用于源/目标组合的范围检查代码。 </p>
-<div class="itemizedlist">
-<ul type="disc">
-<li> The converter's out-of-range behavior can be customized
-via an <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler">OverflowHandler</a> -policy.<br>转换器的溢出行为可以通过 <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_overflow_handler">OverflowHandler</a>
-策略来定制。 </li>
-<li> For floating-point to integral conversions, the rounding
-mode can be selected via the <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_float_to_int_rounder">Float2IntRounder</a> -policy.<br>对于浮点数到整数的转换,舍入的模式可以通过 <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_float_to_int_rounder">Float2IntRounder</a>
-策略来选择。 </li>
-<li> A custom low-level conversion routine (for UDTs for
-instance) can be passed via a <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_raw_converter">RawConverter</a> -policy.<br>定制的低级转换程序(如用于UDT)可通过 <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_raw_converter">RawConverter</a>
-策略传入。 </li>
-<li> The optimized automatic range-checking logic can be
-overridden via a <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a> -policy.<br>优化的自动范围检查逻辑可通过 <a class="link" href="boost_numericconversion/numeric_converter_policy_classes.html#numeric_conversion_policy_user_range_checker">UserRangeChecker</a>
-策略进行重载。 </li>
-</ul>
-</div>
-</div>
-<a name="numeric_conversion_converter"></a>
-<p> </p>
-<a name="numeric_conversion_requirements"></a>
-<p> </p>
-<a name="numeric_conversion_bounds"></a>
-<p> </p>
-<a name="numeric_conversion_traits"></a>
-<p> </p>
-<a name="numeric_coversion_converter_policies"></a>
-<p> </p>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%">
-<tbody>
-<tr>
-<td align="left">
-<p><small>Last revised: October 10, 2008 at 20:47:59 GMT</small></p></td>
-<td align="right">
-<div class="copyright-footer"></div>
-</td>
-</tr>
-</tbody>
-</table>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr> +<td align="left"><p><small>Last revised: March 23, 2010 at 03:38:15 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
 <hr>
<div class="spirit-nav"><a accesskey="n" href="boost_numericconversion/definitions.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a></div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/numeric_conversion/bibliography.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/numeric_conversion/bibliography.html Mon Mar 22 20:44:11 2010
@@ -1,32 +1,33 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-<title>Bibliography</title><link rel="stylesheet" href="../boostbook.css" type="text/css">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Bibliography &#21442;&#32771;&#20070;&#30446;</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="prev" href="history_and_acknowledgments.html" title="History and Acknowledgments"></head> -<body alink="#0000ff" bgcolor="white" link="#0000ff" text="black" vlink="#840084">
-<table cellpadding="2" width="100%"><tbody><tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="history_and_acknowledgments.html" title="History and Acknowledgments &#21382;&#21490;&#21644;&#40483;&#35874;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="history_and_acknowledgments.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage"><div><div><h2 class="title" style="clear: both;">
-<a name="numeric_conversion.bibliography"></a><a class="link" href="bibliography.html" title="Bibliography">Bibliography 参考书目</a>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="numeric_conversion.bibliography"></a><a class="link" href="bibliography.html" title="Bibliography &#21442;&#32771;&#20070;&#30446;"> Bibliography &#21442;&#32771;&#20070;&#30446;</a>
 </h2></div></div></div>
 <div class="itemizedlist"><ul type="disc">
 <li>
-        Standard Documents: 标准文档:
+        Standard Documents: &#26631;&#20934;&#25991;&#26723;:
         <div class="orderedlist"><ol type="1">
 <li>
             ISO/IEC 14882:98 (C++98 Standard)
@@ -56,7 +57,7 @@
 </ol></div>
 </li>
 <li>
-        Papers: 论文:
+        Papers: &#35770;&#25991;&#65306;
         <div class="orderedlist"><ol type="1">
 <li>
David Goldberg What Every Computer Scientist Should Know About Floating-Point
@@ -69,16 +70,17 @@
 </li>
 </ul></div>
 </div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tbody><tr> +<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2004 -2007 Fernando Luis Cacciola Carballal<p> +<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>)
       </p>
 </div></td>
-</tr></tbody></table>
+</tr></table>
 <hr>
 <div class="spirit-nav">
<a accesskey="p" href="history_and_acknowledgments.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/html/numeric_conversion/history_and_acknowledgments.html Thu Sep 4 19:26:19 2008 +++ /trunk/libs/numeric/conversion/doc/html/numeric_conversion/history_and_acknowledgments.html Mon Mar 22 20:44:11 2010
@@ -1,103 +1,105 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>History and Acknowledgments</title>
-
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>History and Acknowledgments &#21382;&#21490;&#21644;&#40483;&#35874;</title>
 <link rel="stylesheet" href="../boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
-<link rel="start" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="up" href="../index.html" title="Chapter&nbsp;1.&nbsp;Boost.NumericConversion"> -<link rel="prev" href="../boost_numericconversion/improved_numeric_cast__.html" title="Improved numeric_cast&lt;&gt;">
-<link rel="next" href="bibliography.html" title="Bibliography"></head>
-<body style="color: black; background-color: white;" alink="#0000ff" link="#0000ff" vlink="#840084">
-<table cellpadding="2" width="100%">
-<tbody>
-<tr>
-<td valign="top"><img alt="Boost C++ Libraries" src="../../../../../../boost.png" height="86" width="277"></td> +<link rel="start" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Boost.NumericConversion"> +<link rel="prev" href="../boost_numericconversion/improved_numeric_cast__.html" title="Improved numeric_cast&lt;&gt; &#25913;&#36827;&#30340;numeric_cast&lt;&gt;"> +<link rel="next" href="bibliography.html" title="Bibliography &#21442;&#32771;&#20070;&#30446;">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
 <td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> -<td align="center"><a href="http://www.boost.org/people/people.htm";>People</a></td>
-<td align="center"><a href="http://www.boost.org/more/faq.htm";>FAQ</a></td>
+<td align="center"><a href="http://www.boost.org/users/people.html";>People</a></td> +<td align="center"><a href="http://www.boost.org/users/faq.html";>FAQ</a></td>
 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
-</tr>
-</tbody>
-</table>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="../boost_numericconversion/improved_numeric_cast__.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bibliography.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<div class="spirit-nav">
+<a accesskey="p" href="../boost_numericconversion/improved_numeric_cast__.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bibliography.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
-<div class="titlepage">
-<div>
-<div>
-<h2 class="title" style="clear: both;"><a name="numeric_conversion.history_and_acknowledgments"></a><a class="link" href="history_and_acknowledgments.html" title="History and Acknowledgments">History and
-Acknowledgments 历史和鸣谢</a>
-</h2>
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="numeric_conversion.history_and_acknowledgments"></a><a class="link" href="history_and_acknowledgments.html" title="History and Acknowledgments &#21382;&#21490;&#21644;&#40483;&#35874;"> History
+    and Acknowledgments &#21382;&#21490;&#21644;&#40483;&#35874;</a>
+</h2></div></div></div>
+<a name="numeric_conversion.history_and_acknowledgments.pre_formal_review___________________"></a><h4>
+<a name="id4888109"></a>
+ <a class="link" href="history_and_acknowledgments.html#numeric_conversion.history_and_acknowledgments.pre_formal_review___________________">Pre-formal
+      review &#27491;&#24335;&#23457;&#26597;&#20043;&#21069;</a>
+    </h4>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Kevlin Henney, with help from David Abrahams and Beman Dawes, originally + contributed the previous version of <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> which already presented the idea + of a runtime range check.<br> Kevlin Henney&#65292;&#22312; David Abrahams &#21644; Beman + Dawes &#30340;&#24110;&#21161;&#19979;&#65292;&#36129;&#29486;&#20102; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> &#30340;&#26089;&#26399;&#29256;&#26412;&#65292;&#20854;&#20013;&#24050;&#32463;&#20986;&#29616;&#20102;&#36816;&#34892;&#26399;&#33539;&#22260;&#26816;&#26597;&#30340;&#24819;&#27861;&#12290;
+      </li>
+<li>
+ Later, Eric Ford, Kevin Lynch and the author spotted some genericity problems + with that <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> + which prevented it from being used in a generic layer of math functions.<br> + &#21518;&#26469;&#65292;Eric Ford, Kevin Lynch &#21644;&#20316;&#32773;&#21457;&#29616;&#20102; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> &#30340;&#19968;&#20123;&#27867;&#22411;&#30340;&#38382;&#39064;&#65292;&#36825;&#22952;&#30861;&#20102;&#23427;&#34987;&#29992;&#20110;&#25968;&#23398;&#20989;&#25968;&#30340;&#27867;&#21270;&#23618;&#12290;
+      </li>
+<li>
+ An improved <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> which properly handled all combinations + of arithmetic types was presented.<br> &#19968;&#20010;&#25913;&#36827;&#21518;&#30340; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>&#65292;&#21487;&#20197;&#27491;&#30830;&#22788;&#29702;&#31639;&#26415;&#31867;&#22411;&#30340;&#25152;&#26377;&#32452;&#21512;&#12290;
+      </li>
+<li>
+ David Abrahams and Beman Dawes acknowledged the need of an improved version + of <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> + and supported the submission as originally laid out. Daryl Walker and Darin + Adler made some important comments and proposed fixes to the original submission.<br> + David Abrahams &#21644; Beman Dawes &#35748;&#35782;&#21040;&#38656;&#35201;&#19968;&#20010;&#25913;&#36827;&#29256;&#26412;&#30340; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> + &#24182;&#25903;&#25345;&#21407;&#20808;&#25552;&#20132;&#30340;&#35268;&#23450;&#12290; Daryl Walker &#21644; Darin Adler &#20316;&#20102;&#19968;&#20123;&#37325;&#35201;&#30340;&#35828;&#26126;&#24182;&#23545;&#21407;&#20808;&#30340;&#35268;&#23450;&#24314;&#35758;&#20102;&#19968;&#20123;&#20462;&#27491;&#12290;
+      </li>
+<li>
+ Special thanks go to Bj&#246;rn Karlsoon who helped the author considerably. + Having found the problems with <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> himself, he revised very carefully + the original submission and spot a subtle bug in the range checking implementation. + He also wrote part of this documentation and proof-read and corrected other + parts. And most importantly: the features now presented here in this library + evolved from the original submission as a result of the useful private communications + between Bj&#246;rn and the author.<br> &#29305;&#21035;&#24863;&#35874;&#32473;&#20104;&#20102;&#20316;&#32773;&#30456;&#24403;&#22810;&#24110;&#21161;&#30340; + Bj&#246;rn Karlsoon&#12290;&#20182;&#21457;&#20986;&#20102; <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> &#30340;&#19968;&#20123;&#38382;&#39064;&#65292; &#38750;&#24120;&#20180;&#32454;&#22320;&#20462;&#27491;&#20102;&#21407;&#20808;&#30340;&#35268;&#23450;&#24182;&#22312;&#33539;&#22260;&#26816;&#26597;&#23454;&#29616;&#20013;&#21457;&#29616;&#20102;&#19968;&#20010;&#24494;&#22937;&#30340;&#32570;&#38519;&#12290;&#20182;&#36824;&#32534;&#20889;&#20102;&#37096;&#20998;&#25991;&#26723;&#21644;&#26657;&#23545;&#24182;&#20462;&#27491;&#20102;&#20854;&#23427;&#37096;&#20998;&#12290; + &#26368;&#37325;&#35201;&#30340;&#26159;&#65306;&#26412;&#24211;&#20013;&#30446;&#21069;&#30340;&#29305;&#24615;&#26159;&#30001;&#21407;&#20808;&#30340;&#35268;&#23450;&#32463;&#30001; Bj&#246;rn + &#21644;&#20316;&#32773;&#30340;&#31169;&#19979;&#27807;&#36890;&#32780;&#36827;&#21270;&#32780;&#26469;&#30340;&#12290;
+      </li>
+</ul></div>
+<a name="numeric_conversion.history_and_acknowledgments.post_formal_review___________________"></a><h4>
+<a name="id4888384"></a>
+ <a class="link" href="history_and_acknowledgments.html#numeric_conversion.history_and_acknowledgments.post_formal_review___________________">Post-formal
+      review &#27491;&#24335;&#23457;&#26597;&#20043;&#21518;</a>
+    </h4>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Guillaume Melquiond spoted some documentation and code issues, particularly + about rounding conversions.<br> Guillaume Melquiond &#25351;&#20986;&#19968;&#20123;&#25991;&#26723;&#21644;&#20195;&#30721;&#30340;&#38382;&#39064;&#65292;&#29305;&#21035;&#26159;&#19982;&#33293;&#20837;&#36716;&#25442;&#26377;&#20851;&#30340;&#12290;
+      </li>
+<li>
+ The following people contributed an important review of the design, documentation + and c ode: Kevin Lynch, Thorsten Ottosen, Paul Bristow, Daryle Walker, Jhon + Torjo, Eric Ford, Gennadiy Rozental.<br> &#20197;&#19979;&#20154;&#21592;&#23545;&#20110;&#35774;&#35745;&#12289;&#25991;&#26723;&#21644;&#20195;&#30721;&#30340;&#23457;&#26597;&#20316;&#20986;&#37325;&#35201;&#36129;&#29486;&#65306;Kevin + Lynch, Thorsten Ottosen, Paul Bristow, Daryle Walker, Jhon Torjo, Eric Ford,
+        Gennadiy Rozental.
+      </li>
+</ul></div>
 </div>
-</div>
-</div>
-<a name="numeric_conversion.history_and_acknowledgments.pre_formal_review"></a> -<h4><a name="id2656675"></a> <a class="link" href="history_and_acknowledgments.html#numeric_conversion.history_and_acknowledgments.pre_formal_review">Pre-formal
-review 正式审查之前</a> </h4>
-<div class="itemizedlist">
-<ul type="disc">
-<li> Kevlin Henney, with help from David Abrahams and Beman
-Dawes, originally contributed the previous version of <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>
-which already presented the idea of a runtime range check. <br>Kevlin
-Henney,在 David Abrahams 和 Beman Dawes 的帮助下,贡献了 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>
-的早期版本,其中已经出现了运行期范围检查的想法。 </li>
-<li> Later, Eric Ford, Kevin Lynch and the author spotted some
-genericity problems with that <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>
-which prevented it from being used in a generic layer of math
-functions.<br>后来,Eric Ford, Kevin Lynch 和作者发现了 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> 的一些泛型的问题,这妨碍了它被用于数 学函数的泛化层。 </li> -<li> An improved <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>
-which properly handled all combinations of arithmetic types was
-presented.<br>一个改进后的 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>,可以正确处理算术类型的所有组合。 </li>
-<li> David Abrahams and Beman Dawes acknowledged the need of an
-improved version of <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>
-and supported the submission as originally laid out. Daryl Walker and
-Darin Adler made some important comments and proposed fixes to the
-original submission.<br> David Abrahams 和 Beman Dawes 认识到需要一个改进版 本的 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> 并支持原先提交的规定。Daryl Walker 和
-Darin Adler 作了一些重要的说明并对原先的规定建议了一些修正。 </li>
-<li> Special thanks go to Björn Karlsoon who helped the author
-considerably. Having found the problems with <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code>
-himself, he revised very carefully the original submission and spot a
-subtle bug in the range checking implementation. He also wrote part of
-this documentation and proof-read and corrected other parts. And most
-importantly: the features now presented here in this library evolved
-from the original submission as a result of the useful private
-communications between Björn and the author.<br>特别感谢给予了作者相当多帮 助的 Björn Karlsoon。他发出了 <code class="computeroutput"><span class="identifier">numeric_cast</span><span class="special">&lt;&gt;</span></code> -的一些问题,非常仔细地修正了原先的规定并在范围检查实现中发现了一个微妙的缺 陷。他还编写了部分文档和校对并修正了其它部分。最重要的是:本库中目前的特性是 由原先的规定经由 Björn 和作者的私下沟通而进化而来的。 </li>
-</ul>
-</div>
-<a name="numeric_conversion.history_and_acknowledgments.post_formal_review"></a> -<h4><a name="id2656827"></a> <a class="link" href="history_and_acknowledgments.html#numeric_conversion.history_and_acknowledgments.post_formal_review">Post-formal
-review 正式审查之后</a> </h4>
-<div class="itemizedlist">
-<ul type="disc">
-<li> Guillaume Melquiond spoted some documentation and code
-issues, particularly about rounding conversions.<br> Guillaume Melquiond 指 出一些文档和代码的问题,特别是与舍入转换有关的。 </li>
-<li> The following people contributed an important review of
-the design, documentation and code: Kevin Lynch, Thorsten Ottosen,
-Paul Bristow, Daryle Walker, Jhon Torjo, Eric Ford, Gennadiy Rozental.<br>以下人员对于设计、文档和代码的审查作出重要贡献:Kevin Lynch, Thorsten Ottosen, -Paul Bristow, Daryle Walker, Jhon Torjo, Eric Ford, Gennadiy Rozental. </li>
-</ul>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%">
-<tbody>
-<tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"; width="100%"><tr>
 <td align="left"></td>
-<td align="right">
-<div class="copyright-footer">Copyright © 2004 -2007
-Fernando Luis Cacciola Carballal
-<p> Distributed under the Boost Software License, Version
-1.0. (See accompanying 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>)
-</p>
-</div>
-</td>
-</tr>
-</tbody>
-</table>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2004 -2007 Fernando Luis Cacciola Carballal<p> + Distributed under the Boost Software License, Version 1.0. (See accompanying + 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>)
+      </p>
+</div></td>
+</tr></table>
 <hr>
-<div class="spirit-nav"><a accesskey="p" href="../boost_numericconversion/improved_numeric_cast__.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bibliography.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<div class="spirit-nav">
+<a accesskey="p" href="../boost_numericconversion/improved_numeric_cast__.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bibliography.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
-</body></html>
+</body>
+</html>
=======================================
--- /trunk/libs/numeric/conversion/doc/numeric_cast.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/numeric_cast.qbk Mon Mar 22 20:44:11 2010
@@ -8,22 +8,29 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ]

-[section  Improved numeric_cast<>]
-
-[section Introduction]
+[section:improved_numeric_cast__ Improved numeric_cast<> 改进的 numeric_cast<>]
+
+[section:introduction Introduction 简介]

 The lack of preservation of range makes conversions between numeric types
 error prone. This is true for both implicit conversions and explicit
 conversions (through `static_cast`).
[link boost_numericconversion.improved_numeric_cast__.numeric_cast `numeric_cast`]
 detects loss of range when a numeric type is converted, and throws an
-exception if the range cannot be preserved.
-
-There are several situations where conversions are unsafe:
-
-* Conversions from an integral type with a wider range than the target integral type.
-* Conversions from unsigned to signed (and vice versa) integral types.
-* Conversions from floating point types to integral types.
+exception if the range cannot be preserved.\n
+由于缺乏对范围的保护,所以数字类型间的转换很容易出错。这对于隐式转换和显式 转换(通过 `static_cast`) 都是一样的。 +[link boost_numericconversion.improved_numeric_cast__.numeric_cast `numeric_cast`]
+可以在转换一个数字类型时检查范围的损失,如果范围不能被保持就抛出一个异常。
+
+There are several situations where conversions are unsafe:\n
+当转换是不安全的时候,有以下几各种情况:
+
+* Conversions from an integral type with a wider range than the target integral type.\n
+  从一个比目标类型范围更宽的整型类型进行转换。
+* Conversions from unsigned to signed (and vice versa) integral types.\n
+  从无符号整型到有符号整型(以及相反方向)的转换。
+* Conversions from floating point types to integral types.\n
+  从浮点类型到整型类型的转换。

 The C++ Standard does not specify the behavior when a numeric type is
assigned a value that cannot be represented by the type, except for unsigned
@@ -32,13 +39,19 @@
 greater than the largest value that can be represented). The fact that the
 behavior for overflow is undefined for all conversions (except the
 aforementioned unsigned to unsigned) makes any code that may produce
-positive or negative overflows exposed to portability issues.
+positive or negative overflows exposed to portability issues.\n
+C+ +标准没有规定当一个数字类型被赋予一个该类型不能表示的值时的行为,除了无 符号整数类型以外\[3.9.1.4\], +后者必须遵守模2n算术的法则(这意味着结果会将大于可表示的最大值的数进行取模降 值)。 +事实上,对于所有转换(除了上述的无符号至无符号的转换),溢出的行为是未定义 的,
+这使得任何可能产生正或负的溢出的代码都存在可移植性的问题。

 `numeric_cast` adheres to the rules for implicit conversions mandated by
 the C++ Standard, such as truncating floating point types when converting
 to integral types. The implementation must guarantee that for a conversion
 to a type that can hold all possible values of the source type, there will
-be no runtime overhead.
+be no runtime overhead.\n
+`numeric_cast` 遵守C++标准所制定的隐式转换规则,例如将浮点类型转换为整型类 型时进行截断。 +其实现必须保证对于到一个类型的转换,可以保持源类型的所有可能值,且没有运行 期开销。

 [endsect]

@@ -57,13 +70,17 @@
 [link numeric_conversion_bad_numeric_cast bad_numeric_cast],
 [link numeric_conversion_negative_overflow negative_overflow] and
 [link numeric_conversion_possitive_overflow positive_overflow]
-).
+).\n
+`numeric_cast` 返回一个类型为 Source 的值转换为类型为 Target 的值的结果。
+如果检测到超出范围,将抛出一个异常(请见 [link numeric_conversion_bad_numeric_cast bad_numeric_cast], +[link numeric_conversion_negative_overflow negative_overflow] 和 [link numeric_conversion_possitive_overflow positive_overflow]).

 [endsect]

-[section Examples]
-
-The following example performs some typical conversions between numeric types:
+[section:examples Examples 例子]
+
+The following example performs some typical conversions between numeric types:\n
+以下例子执行了一些数字类型间的典型转换:

 #include <boost/numeric/conversion/cast.hpp>
 #include <iostream>
@@ -79,7 +96,7 @@
         try
         {
             int i=42;
- short s=numeric_cast<short>(i); // This conversion succeeds (is in range) + short s=numeric_cast<short>(i); // This conversion succeeds (is in range) 转换成功(在范围内)
         }
         catch(negative_overflow& e) {
             std::cout << e.what();
@@ -93,6 +110,7 @@
             float f=-42.1234;

// This will cause a boost::numeric::negative_overflow exception to be thrown
+            // 这将引发一个 boost::numeric::negative_overflow 异常被抛出
             unsigned int i=numeric_cast<unsigned int>(f);
         }
         catch(bad_numeric_cast& e) {
@@ -108,6 +126,9 @@
// This will cause a boost::numeric::positive_overflow exception to be thrown // NOTE: *operations* on unsigned integral types cannot cause overflow // but *conversions* to a signed type ARE range checked by numeric_cast.
+            // 这将引发一个 boost::numeric::positive_overflow 异常被抛出
+            // 注:在无符号整数类型上的*operations*不会引起溢出,
+ // 但是在有符号类型上的*operations*则要由 numeric_cast 进行范围 检查

             unsigned char c=numeric_cast<unsigned char>(l);
         }
=======================================
--- /trunk/libs/numeric/conversion/doc/requirements.qbk Mon Feb 8 07:24:10 2010 +++ /trunk/libs/numeric/conversion/doc/requirements.qbk Mon Mar 22 20:44:11 2010
@@ -8,22 +8,26 @@
     http://www.boost.org/LICENSE_1_0.txt)
 ]

-[section Type Requirements and User-defined-types support]
-
-[section Type Requirements]
+[section:type_requirements_and_user_defined_types_support Type Requirements and User-defined-types support 类型要求和用户自定义类型支持]
+
+[section:type_requirements Type Requirements 类型要求]

 Both arithmetic (built-in) and user-defined numeric types require proper
specialization of `std::numeric_limits<>` (that is, with (in-class) integral
-constants).
+constants).\n
+算术类型(内建的)和用户自定义的数字类型都要求对 `std::numeric_limits<>` (以 (类中)的整型常量)进行正确的特化。

 The library uses `std::numeric_limits<T>::is_specialized` to detect whether
the type is builtin or user defined, and `std::numeric_limits<T>::is_integer`,
 `std::numeric_limits<T>::is_signed` to detect whether the type is integer
-or floating point; and whether it is signed/unsigned.
+or floating point; and whether it is signed/unsigned.\n
+本库用 `std::numeric_limits<T>::is_specialized` 来检测某个类型是否内建的或 用户定义的, +用 `std::numeric_limits<T>::is_integer`, `std::numeric_limits<T>::is_signed` 来检测某个类型为整数或浮点数;以及是否有 符号/无符号。

 The default `Float2IntRounder` policies uses unqualified calls to functions
 `floor()` and `ceil()`; but the standard functions are introduced in scope
-by a using directive:
+by a using directive:\n
+缺省的 `Float2IntRounder` 策略以非受限方式调用函数 `floor()` 和 `ceil()`;而标准函数是通过一个 using 指令引入到作用域中:

     using std::floor ; return floor(s);

@@ -32,25 +36,33 @@
 order to use the default rounder policies. If these overloads are defined
 within a user namespace argument dependent lookup (ADL) should find them,
 but if your compiler has a weak ADL you might need to put these functions
-some place else or write your own rounder policy.
+some place else or write your own rounder policy.\n
+因此,对于内建的算术类型,将使用标准函数。为了使用缺省的舍入策略,用户自定 义类型应该提供这些函数的重载版本。 +如果这些重载是在一个用户名字空间内定义的,参数依赖查找(ADL)会找到它们,但是 如果你的编译器的ADL较弱,
+那么你可能需要将这些函数放在其它地方,或者编写你自己的舍入策略。

 The default `Trunc<>` rounder policy needs to determine if the source value
 is positive or not, and for this it evaluates the expression
 `s < static_cast<S>(0)`. Therefore, user defined types require a visible
-`operator<` in order to use the `Trunc<>` policy (the default).
+`operator<` in order to use the `Trunc<>` policy (the default).\n
+缺省的 `Trunc<>` 舍入策略需要判断源数值是否为正,为此它要对表达式 `s < static_cast<S>(0)` 进行求值。 +因此,为了使用 `Trunc<>` 策略(缺省情况),用户自定义类型需要一个可见的 `operator<` 。


 [endsect]

-[section UDT's special semantics]
-
-[heading Conversion Traits]
+[section:udt_s_special_semantics UDT's special semantics 用户自定义类型的特 殊语义]
+
+[heading Conversion Traits 转换Traits]

 If a User Defined Type is involved in a conversion, it is ['assumed] that
the UDT has [link boost_numericconversion.definitions.range_and_precision wider range]
 than any built-in type, and consequently the values
of some `converter_traits<>` members are hardwired regardless of the reality.
-The following table summarizes this:
+The following table summarizes this:\n
+在转换中,如果涉及到用户自定义类型,将 ['假定] UDT 具有比任意内建类型
+[link boost_numericconversion.definitions.range_and_precision 更广的范围 ],因此不管事实如何,
+有些 `converter_traits<>` 成员就是硬性规定的。总结如下表:

 * `Target=`['UDT] and `Source=`['built-in]
     * `subranged=false`
@@ -68,9 +80,10 @@


The `Traits` member `udt_mixture` can be used to detect whether a UDT is involved
-and to infer the validity of the other members as shown above.
-
-[heading Range Checking]
+and to infer the validity of the other members as shown above.\n
+`Traits` 成员 `udt_mixture` 可用于检测是否涉及某个 UDT 并如上所示推断其它成 员的有效性。
+
+[heading Range Checking 范围检查]

 Because User Defined Numeric Types might have peculiar ranges (such as an
unbounded range), this library does not attempt to supply a meaningful range
@@ -78,31 +91,42 @@
 Target or Source are not built-in types, the bundled range checking of the
`converter<>` function object is automatically disabled. However, it is possible
 to supply a user-defined range-checker. See
-[link boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies Special Policies] +[link boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies Special Policies]\n +因为用户自定义数字类型可能具有特殊的范围(如一个无界的范围),因此本库在转换 涉及某个UDT时不提供一个有意义的范围检查逻辑。 +因此,如果目标类型或源类型之一不是内建类型,则 `converter<>` 函数对象所绑定 的范围检查就会自动禁用。
+不过,你可以提供一个用户自定义的范围检查器。请见
+[link boost_numericconversion.type_requirements_and_user_defined_types_support.special_policies 特殊策略]。

 [endsect]

-[section Special Policies]
+[section:special_policies Special Policies 特殊策略]

There are two components of the `converter<>` class that might require special behavior if User Defined Numeric Types are involved: the Range Checking and the
-Raw Conversion.
+Raw Conversion.\n
+如果涉及到用户自定义类型,`converter<>` 类中有两个组件可能需要特殊的行 为:范围检查和原始转换。

When both Target and Source are built-in types, the converter class uses an internal range checking logic which is optimized and customized for the combined properties
-of the types.
+of the types.\n
+当目标类型和源类型都是内建类型时,转换器类使用一个内部的范围检查逻辑,该逻 辑针对类型的组合特性进行了优化和定制。

 However, this internal logic is disabled when either type is User Defined.
In this case, the user can specify an ['external] range checking policy which will be
 used in place of the internal code. See
-[link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] policy for details. +[link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] policy for details.\n +但是,当有其中一个类型是用户自定义类型时,该内部逻辑就会被禁用。这种情况 下,用户可以指定一个 ['外部] 的范围检查策略,用于替换内部代码。 +具体请见 [link boost_numericconversion.numeric_converter_policy_classes.policy_userrangechecker UserRangeChecker] 策略。

The converter class performs the actual conversion using a Raw Converter policy.
-The default raw converter simply performs a `static_cast<Target>(source)`.
+The default raw converter simply performs a `static_cast<Target>(source)`.\n +转换器类使用一个原始转换器策略执行实际的转换。缺省的原始转换器只是执行一个 `static_cast<Target>(source)`.

However, if the a UDT is involved, the `static_cast` might not work. In this case,
 the user can implement and pass a different raw converter policy.
-See [link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] policy for details +See [link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] policy for details\n +但是,如果涉及到 UDT,`static_cast` 也许就不能奏效了。这种情况下,用户可以 实现一个不同的原始转换器策略并传入它。具体请见 +[link boost_numericconversion.numeric_converter_policy_classes.policy_rawconverter RawConverter] 策略。

 [endsect]

Other related posts:

  • » [boost-doc-zh] r390 committed - 翻译 numeric/conversion 库的 qbk 文件并生成 html 目录 - boost-doc-zh