Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74762 - in branches/release: . boost boost/algorithm/string boost/bimap boost/config boost/date_time boost/date_time/posix_time boost/detail boost/dynamic_bitset boost/filesystem boost/function boost/functional boost/fusion boost/fusion/container/list/detail boost/geometry boost/geometry/algorithms boost/geometry/arithmetic boost/geometry/core boost/geometry/domains boost/geometry/geometries boost/geometry/iterators boost/geometry/multi boost/geometry/policies boost/geometry/strategies boost/geometry/util boost/geometry/views boost/gil boost/graph boost/icl boost/integer boost/interprocess boost/intrusive boost/io boost/iostreams boost/iterator boost/locale boost/math boost/msm boost/msm/back boost/msm/front boost/msm/front/detail boost/msm/front/euml boost/msm/mpl_graph boost/numeric/conversion boost/numeric/conversion/detail boost/numeric/conversion/detail/preprocessed boost/numeric/ublas boost/pool boost/program_options boost/program_options/detail boost/property_tree boost/python boost/range boost/regex boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/system boost/thread boost/tr1 boost/typeof boost/utility boost/uuid boost/variant boost/wave boost/xpressive doc libs libs/algorithm/string libs/array libs/array/test libs/bimap libs/config libs/date_time libs/date_time/data libs/date_time/example/gregorian libs/date_time/example/local_time libs/date_time/example/posix_time libs/date_time/example/tutorial libs/date_time/test/posix_time libs/date_time/xmldoc libs/detail libs/filesystem libs/function libs/functional libs/fusion libs/geometry libs/geometry/doc libs/geometry/doc/concept libs/geometry/doc/doxy libs/geometry/doc/generated libs/geometry/doc/html libs/geometry/doc/reference libs/geometry/doc/src libs/geometry/example libs/geometry/test libs/graph/doc libs/graph_parallel libs/icl libs/icl/doc libs/icl/doc/html libs/icl/doc/html/header/boost/icl libs/icl/test libs/icl/test/test_doc_code_ libs/integer libs/interprocess libs/intrusive libs/io libs/io/doc libs/iostreams libs/iterator libs/locale libs/math libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/html/math_toolkit/main_overview libs/math/test libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/msm libs/numeric/conversion/doc libs/numeric/conversion/test libs/numeric/conversion/test/compile_fail libs/numeric/ublas libs/numeric/ublas/doc libs/parameter/doc/html libs/phoenix/doc libs/phoenix/doc/examples libs/pool libs/program_options libs/program_options/test libs/property_tree libs/python libs/range libs/regex libs/signals libs/signals2 libs/signals2/doc libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/thread libs/timer libs/tr1 libs/typeof/doc libs/utility libs/utility/swap/test libs/uuid libs/wave more status tools tools/boostbook tools/build/v2 tools/build/v2/tools tools/inspect tools/quickbook tools/wave
From: blkohn_at_[hidden]
Date: 2011-10-06 13:27:19


Author: brandon.kohn
Date: 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
New Revision: 74762
URL: http://svn.boost.org/trac/boost/changeset/74762

Log:
Merge of numeric_cast_traits in numeric conversion library.
Added:
   branches/release/boost/numeric/conversion/detail/numeric_cast_traits.hpp
      - copied, changed from r73675, /trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp
   branches/release/boost/numeric/conversion/detail/preprocessed/
      - copied from r73675, /trunk/boost/numeric/conversion/detail/preprocessed/
   branches/release/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp
      - copied, changed from r73675, /trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp
   branches/release/boost/numeric/conversion/numeric_cast_traits.hpp
      - copied, changed from r73675, /trunk/boost/numeric/conversion/numeric_cast_traits.hpp
   branches/release/libs/numeric/conversion/test/compile_fail/
      - copied from r73675, /trunk/libs/numeric/conversion/test/compile_fail/
   branches/release/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp
      - copied, changed from r73675, /trunk/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp
   branches/release/libs/numeric/conversion/test/numeric_cast_traits_test.cpp
      - copied, changed from r73675, /trunk/libs/numeric/conversion/test/numeric_cast_traits_test.cpp
Properties modified:
   branches/release/ (props changed)
   branches/release/INSTALL (props changed)
   branches/release/Jamroot (props changed)
   branches/release/LICENSE_1_0.txt (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost-build.jam (props changed)
   branches/release/boost.css (props changed)
   branches/release/boost.png (props changed)
   branches/release/boost/algorithm/string/ (props changed)
   branches/release/boost/array.hpp (props changed)
   branches/release/boost/bimap/ (props changed)
   branches/release/boost/concept_check.hpp (props changed)
   branches/release/boost/config/ (props changed)
   branches/release/boost/config.hpp (props changed)
   branches/release/boost/cregex.hpp (props changed)
   branches/release/boost/cstdint.hpp (props changed)
   branches/release/boost/date_time/c_time.hpp (props changed)
   branches/release/boost/date_time/date_formatting.hpp (props changed)
   branches/release/boost/date_time/filetime_functions.hpp (props changed)
   branches/release/boost/date_time/gregorian_calendar.ipp (props changed)
   branches/release/boost/date_time/posix_time/time_serialize.hpp (props changed)
   branches/release/boost/date_time/strings_from_facet.hpp (props changed)
   branches/release/boost/date_time/time_facet.hpp (props changed)
   branches/release/boost/date_time/tz_db_base.hpp (props changed)
   branches/release/boost/detail/ (props changed)
   branches/release/boost/detail/interlocked.hpp (props changed)
   branches/release/boost/dynamic_bitset/dynamic_bitset.hpp (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (props changed)
   branches/release/boost/function/ (props changed)
   branches/release/boost/function/function_template.hpp (props changed)
   branches/release/boost/functional/ (props changed)
   branches/release/boost/fusion/ (props changed)
   branches/release/boost/fusion/container/list/detail/build_cons.hpp (props changed)
   branches/release/boost/geometry/ (props changed)
   branches/release/boost/geometry/algorithms/ (props changed)
   branches/release/boost/geometry/arithmetic/ (props changed)
   branches/release/boost/geometry/core/ (props changed)
   branches/release/boost/geometry/domains/ (props changed)
   branches/release/boost/geometry/geometries/ (props changed)
   branches/release/boost/geometry/geometry.hpp (props changed)
   branches/release/boost/geometry/iterators/ (props changed)
   branches/release/boost/geometry/multi/ (props changed)
   branches/release/boost/geometry/policies/ (props changed)
   branches/release/boost/geometry/strategies/ (props changed)
   branches/release/boost/geometry/util/ (props changed)
   branches/release/boost/geometry/views/ (props changed)
   branches/release/boost/gil/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/icl/ (props changed)
   branches/release/boost/integer/ (props changed)
   branches/release/boost/integer.hpp (props changed)
   branches/release/boost/integer_fwd.hpp (props changed)
   branches/release/boost/integer_traits.hpp (props changed)
   branches/release/boost/interprocess/ (props changed)
   branches/release/boost/intrusive/ (props changed)
   branches/release/boost/io/ (props changed)
   branches/release/boost/iostreams/ (props changed)
   branches/release/boost/iterator/ (props changed)
   branches/release/boost/iterator/iterator_facade.hpp (props changed)
   branches/release/boost/locale/ (props changed)
   branches/release/boost/locale.hpp (props changed)
   branches/release/boost/math/ (props changed)
   branches/release/boost/math_fwd.hpp (props changed)
   branches/release/boost/msm/ (props changed)
   branches/release/boost/msm/active_state_switching_policies.hpp (props changed)
   branches/release/boost/msm/back/ (props changed)
   branches/release/boost/msm/back/any_event.hpp (props changed)
   branches/release/boost/msm/back/args.hpp (props changed)
   branches/release/boost/msm/back/bind_helpers.hpp (props changed)
   branches/release/boost/msm/back/common_types.hpp (props changed)
   branches/release/boost/msm/back/copy_policies.hpp (props changed)
   branches/release/boost/msm/back/default_compile_policy.hpp (props changed)
   branches/release/boost/msm/back/dispatch_table.hpp (props changed)
   branches/release/boost/msm/back/favor_compile_time.hpp (props changed)
   branches/release/boost/msm/back/fold_to_list.hpp (props changed)
   branches/release/boost/msm/back/history_policies.hpp (props changed)
   branches/release/boost/msm/back/metafunctions.hpp (props changed)
   branches/release/boost/msm/back/mpl_graph_fsm_check.hpp (props changed)
   branches/release/boost/msm/back/no_fsm_check.hpp (props changed)
   branches/release/boost/msm/back/queue_container_circular.hpp (props changed)
   branches/release/boost/msm/back/queue_container_deque.hpp (props changed)
   branches/release/boost/msm/back/state_machine.hpp (props changed)
   branches/release/boost/msm/back/tools.hpp (props changed)
   branches/release/boost/msm/common.hpp (props changed)
   branches/release/boost/msm/front/ (props changed)
   branches/release/boost/msm/front/common_states.hpp (props changed)
   branches/release/boost/msm/front/completion_event.hpp (props changed)
   branches/release/boost/msm/front/detail/ (props changed)
   branches/release/boost/msm/front/detail/common_states.hpp (props changed)
   branches/release/boost/msm/front/detail/row2_helper.hpp (props changed)
   branches/release/boost/msm/front/euml/ (props changed)
   branches/release/boost/msm/front/euml/algorithm.hpp (props changed)
   branches/release/boost/msm/front/euml/common.hpp (props changed)
   branches/release/boost/msm/front/euml/container.hpp (props changed)
   branches/release/boost/msm/front/euml/euml.hpp (props changed)
   branches/release/boost/msm/front/euml/euml_typeof.hpp (props changed)
   branches/release/boost/msm/front/euml/guard_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/iteration.hpp (props changed)
   branches/release/boost/msm/front/euml/operator.hpp (props changed)
   branches/release/boost/msm/front/euml/phoenix_placeholders.hpp (props changed)
   branches/release/boost/msm/front/euml/querying.hpp (props changed)
   branches/release/boost/msm/front/euml/state_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/stl.hpp (props changed)
   branches/release/boost/msm/front/euml/stt_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/transformation.hpp (props changed)
   branches/release/boost/msm/front/functor_row.hpp (props changed)
   branches/release/boost/msm/front/internal_row.hpp (props changed)
   branches/release/boost/msm/front/row2.hpp (props changed)
   branches/release/boost/msm/front/state_machine_def.hpp (props changed)
   branches/release/boost/msm/front/states.hpp (props changed)
   branches/release/boost/msm/mpl_graph/ (props changed)
   branches/release/boost/msm/msm_grammar.hpp (props changed)
   branches/release/boost/msm/proto_config.hpp (props changed)
   branches/release/boost/msm/row_tags.hpp (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/numeric/ublas/functional.hpp (props changed)
   branches/release/boost/pool/ (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/program_options/detail/parsers.hpp (props changed)
   branches/release/boost/program_options/parsers.hpp (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/python/ (props changed)
   branches/release/boost/range/ (props changed)
   branches/release/boost/regex/ (props changed)
   branches/release/boost/regex.h (props changed)
   branches/release/boost/regex.hpp (props changed)
   branches/release/boost/regex_fwd.hpp (props changed)
   branches/release/boost/signals/ (props changed)
   branches/release/boost/signals2/ (props changed)
   branches/release/boost/signals2.hpp (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/boost/statechart/ (props changed)
   branches/release/boost/static_assert.hpp (props changed)
   branches/release/boost/system/ (props changed)
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/boost/token_functions.hpp (props changed)
   branches/release/boost/tr1/ (props changed)
   branches/release/boost/typeof/message.hpp (props changed)
   branches/release/boost/typeof/register_functions.hpp (props changed)
   branches/release/boost/typeof/register_functions_iterate.hpp (props changed)
   branches/release/boost/typeof/typeof.hpp (props changed)
   branches/release/boost/typeof/unsupported.hpp (props changed)
   branches/release/boost/utility/ (props changed)
   branches/release/boost/utility/value_init.hpp (props changed)
   branches/release/boost/uuid/ (props changed)
   branches/release/boost/variant/ (props changed)
   branches/release/boost/version.hpp (props changed)
   branches/release/boost/wave/ (props changed)
   branches/release/boost/xpressive/ (props changed)
   branches/release/boostcpp.jam (props changed)
   branches/release/bootstrap.bat (props changed)
   branches/release/bootstrap.sh (props changed)
   branches/release/doc/ (props changed)
   branches/release/index.htm (props changed)
   branches/release/index.html (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/algorithm/string/ (props changed)
   branches/release/libs/array/ (props changed)
   branches/release/libs/array/test/array0.cpp (props changed)
   branches/release/libs/array/test/array2.cpp (props changed)
   branches/release/libs/array/test/array6.cpp (props changed)
   branches/release/libs/bimap/ (props changed)
   branches/release/libs/config/ (props changed)
   branches/release/libs/date_time/ (props changed)
   branches/release/libs/date_time/data/date_time_zonespec.csv (props changed)
   branches/release/libs/date_time/example/gregorian/days_between_new_years.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/days_since_year_start.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/days_till_new_year.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/month_add.cpp (props changed)
   branches/release/libs/date_time/example/local_time/flight.cpp (props changed)
   branches/release/libs/date_time/example/local_time/local_date_time.cpp (props changed)
   branches/release/libs/date_time/example/posix_time/print_hours.cpp (props changed)
   branches/release/libs/date_time/example/posix_time/time_math.cpp (props changed)
   branches/release/libs/date_time/example/tutorial/io_tutorial.cpp (props changed)
   branches/release/libs/date_time/test/posix_time/testtime_facet.cpp (props changed)
   branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp (props changed)
   branches/release/libs/date_time/xmldoc/date_class.xml (props changed)
   branches/release/libs/date_time/xmldoc/usage_examples.xml (props changed)
   branches/release/libs/detail/ (props changed)
   branches/release/libs/filesystem/ (props changed)
   branches/release/libs/function/ (props changed)
   branches/release/libs/functional/ (props changed)
   branches/release/libs/fusion/ (props changed)
   branches/release/libs/geometry/ (props changed)
   branches/release/libs/geometry/doc/ (props changed)
   branches/release/libs/geometry/doc/Jamfile.v2 (props changed)
   branches/release/libs/geometry/doc/about_documentation.qbk (props changed)
   branches/release/libs/geometry/doc/acknowledgments.qbk (props changed)
   branches/release/libs/geometry/doc/compiling.qbk (props changed)
   branches/release/libs/geometry/doc/concept/ (props changed)
   branches/release/libs/geometry/doc/copyright_note_policy.txt (props changed)
   branches/release/libs/geometry/doc/design_rationale.qbk (props changed)
   branches/release/libs/geometry/doc/doxy/ (props changed)
   branches/release/libs/geometry/doc/generated/ (props changed)
   branches/release/libs/geometry/doc/geometry.qbk (props changed)
   branches/release/libs/geometry/doc/html/ (props changed)
   branches/release/libs/geometry/doc/imports.qbk (props changed)
   branches/release/libs/geometry/doc/introduction.qbk (props changed)
   branches/release/libs/geometry/doc/make_qbk.py (props changed)
   branches/release/libs/geometry/doc/matrix.qbk (props changed)
   branches/release/libs/geometry/doc/quickref.xml (props changed)
   branches/release/libs/geometry/doc/quickstart.qbk (props changed)
   branches/release/libs/geometry/doc/readme.txt (props changed)
   branches/release/libs/geometry/doc/reference/ (props changed)
   branches/release/libs/geometry/doc/reference.qbk (props changed)
   branches/release/libs/geometry/doc/src/ (props changed)
   branches/release/libs/geometry/example/ (props changed)
   branches/release/libs/geometry/index.html (props changed)
   branches/release/libs/geometry/test/ (props changed)
   branches/release/libs/graph/doc/ (props changed)
   branches/release/libs/graph_parallel/ (props changed)
   branches/release/libs/icl/ (props changed)
   branches/release/libs/icl/doc/ (props changed)
   branches/release/libs/icl/doc/html/ (props changed)
   branches/release/libs/icl/doc/html/header/boost/icl/ (props changed)
   branches/release/libs/icl/test/ (props changed)
   branches/release/libs/icl/test/test_doc_code_/ (props changed)
   branches/release/libs/integer/ (props changed)
   branches/release/libs/interprocess/ (props changed)
   branches/release/libs/intrusive/ (props changed)
   branches/release/libs/io/ (props changed)
   branches/release/libs/io/doc/ (props changed)
   branches/release/libs/iostreams/ (props changed)
   branches/release/libs/iterator/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/locale/ (props changed)
   branches/release/libs/maintainers.txt (contents, props changed)
   branches/release/libs/math/ (props changed)
   branches/release/libs/math/doc/sf_and_dist/faq.qbk (props changed)
   branches/release/libs/math/doc/sf_and_dist/html/math_toolkit/main_overview/faq.html (props changed)
   branches/release/libs/math/test/s_.ipp (props changed)
   branches/release/libs/mpi/build/ (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
   branches/release/libs/msm/ (props changed)
   branches/release/libs/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/parameter/doc/html/index.html (props changed)
   branches/release/libs/phoenix/doc/basics.qbk (props changed)
   branches/release/libs/phoenix/doc/examples/extending_actors.qbk (props changed)
   branches/release/libs/phoenix/doc/organisation.qbk (props changed)
   branches/release/libs/pool/ (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/program_options/test/parsers_test.cpp (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/python/ (props changed)
   branches/release/libs/range/ (props changed)
   branches/release/libs/regex/ (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/signals2/doc/ (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
   branches/release/libs/statechart/ (props changed)
   branches/release/libs/static_assert/ (props changed)
   branches/release/libs/system/ (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/timer/ (props changed)
   branches/release/libs/tr1/ (props changed)
   branches/release/libs/typeof/doc/typeof.qbk (props changed)
   branches/release/libs/utility/ (props changed)
   branches/release/libs/utility/assert.html (props changed)
   branches/release/libs/utility/assert_test.cpp (props changed)
   branches/release/libs/utility/swap.html (props changed)
   branches/release/libs/utility/swap/test/std_bitset.cpp (props changed)
   branches/release/libs/utility/value_init.htm (props changed)
   branches/release/libs/utility/value_init_test.cpp (props changed)
   branches/release/libs/uuid/ (props changed)
   branches/release/libs/wave/ (props changed)
   branches/release/more/ (props changed)
   branches/release/rst.css (props changed)
   branches/release/status/ (props changed)
   branches/release/status/Jamfile.v2 (props changed)
   branches/release/status/expected_results.xml (props changed)
   branches/release/status/explicit-failures-markup.xml (props changed)
   branches/release/status/explicit-failures.xsd (props changed)
   branches/release/tools/ (props changed)
   branches/release/tools/boostbook/ (props changed)
   branches/release/tools/build/v2/ (props changed)
   branches/release/tools/build/v2/tools/mpi.jam (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/quickbook/ (props changed)
   branches/release/tools/wave/ (props changed)
Text files modified:
   branches/release/boost/numeric/conversion/cast.hpp | 32 ++-
   branches/release/boost/numeric/conversion/detail/numeric_cast_traits.hpp | 8
   branches/release/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp | 2
   branches/release/boost/numeric/conversion/numeric_cast_traits.hpp | 2
   branches/release/libs/maintainers.txt | 2
   branches/release/libs/numeric/conversion/doc/numeric_cast.qbk | 45 ++++
   branches/release/libs/numeric/conversion/doc/requirements.qbk | 344 +++++++++++++++++++++++++++++++++++++++
   branches/release/libs/numeric/conversion/test/Jamfile.v2 | 15 +
   branches/release/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp | 2
   branches/release/libs/numeric/conversion/test/numeric_cast_traits_test.cpp | 68 +++----
   10 files changed, 455 insertions(+), 65 deletions(-)

Modified: branches/release/boost/numeric/conversion/cast.hpp
==============================================================================
--- branches/release/boost/numeric/conversion/cast.hpp (original)
+++ branches/release/boost/numeric/conversion/cast.hpp 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -16,6 +16,7 @@
 // 30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola)
 // 25 Oct 2001 Initial boostification (Fernando Cacciola)
 // 23 Jan 2004 Inital add to cvs (post review)s
+// 22 Jun 2011 Added support for specializing cast policies via numeric_cast_traits (Brandon Kohn).
 //
 #ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
 #define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
@@ -30,22 +31,31 @@
 
 #include <boost/type.hpp>
 #include <boost/numeric/conversion/converter.hpp>
+#include <boost/numeric/conversion/numeric_cast_traits.hpp>
 
 namespace boost
 {
- template<typename Target, typename Source>
- inline
- Target numeric_cast ( Source arg )
- {
- typedef boost::numeric::converter<Target,Source> Converter ;
- return Converter::convert(arg);
- }
-
- using numeric::bad_numeric_cast;
-
+ template <typename Target, typename Source>
+ inline Target numeric_cast( Source arg )
+ {
+ typedef numeric::conversion_traits<Target, Source> conv_traits;
+ typedef numeric::numeric_cast_traits<Target, Source> cast_traits;
+ typedef boost::numeric::converter
+ <
+ Target,
+ Source,
+ conv_traits,
+ typename cast_traits::overflow_policy,
+ typename cast_traits::rounding_policy,
+ boost::numeric::raw_converter< conv_traits >,
+ typename cast_traits::range_checking_policy
+ > converter;
+ return converter::convert(arg);
+ }
+
+ using numeric::bad_numeric_cast;
 } // namespace boost
 
 #endif
 
-
 #endif

Copied: branches/release/boost/numeric/conversion/detail/numeric_cast_traits.hpp (from r73675, /trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp)
==============================================================================
--- /trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp (original)
+++ branches/release/boost/numeric/conversion/detail/numeric_cast_traits.hpp 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -1,5 +1,5 @@
 //
-//! Copyright © 2011
+//! Copyright (c) 2011
 //! Brandon Kohn
 //
 // Distributed under the Boost Software License, Version 1.0. (See
@@ -8,7 +8,8 @@
 //
 #if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES)
     #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp>
-#elif !BOOST_PP_IS_ITERATING
+#else
+#if !BOOST_PP_IS_ITERATING
 
     #include <boost/preprocessor/iteration/iterate.hpp>
     #include <boost/preprocessor/seq/elem.hpp>
@@ -19,7 +20,7 @@
     #endif
 
 //
-//! Copyright © 2011
+//! Copyright (c) 2011
 //! Brandon Kohn
 //
 // Distributed under the Boost Software License, Version 1.0. (See
@@ -101,3 +102,4 @@
     #undef BOOST_NUMERIC_CONVERSION_B
 
 #endif//! Depth 2.
+#endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES

Copied: branches/release/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp (from r73675, /trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp)
==============================================================================
--- /trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp (original)
+++ branches/release/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -1,5 +1,5 @@
 //
-//! Copyright © 2011
+//! Copyright (c) 2011
 //! Brandon Kohn
 //
 // Distributed under the Boost Software License, Version 1.0. (See

Copied: branches/release/boost/numeric/conversion/numeric_cast_traits.hpp (from r73675, /trunk/boost/numeric/conversion/numeric_cast_traits.hpp)
==============================================================================
--- /trunk/boost/numeric/conversion/numeric_cast_traits.hpp (original)
+++ branches/release/boost/numeric/conversion/numeric_cast_traits.hpp 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -1,5 +1,5 @@
 //
-//! Copyright © 2011
+//! Copyright (c) 2011
 //! Brandon Kohn
 //
 // Distributed under the Boost Software License, Version 1.0. (See

Modified: branches/release/libs/maintainers.txt
==============================================================================
--- branches/release/libs/maintainers.txt (original)
+++ branches/release/libs/maintainers.txt 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -58,7 +58,7 @@
 msm Christophe Henry <christophe.j.henry -at- googlemail.com>
 multi_array Ronald Garcia <garcia -at- osl.iu.edu>
 multi_index Joaquin M Lopez Munoz <joaquin -at- tid.es>
-numeric/conversion Fernando Cacciola <fernando_cacciola -at- ciudad.com.ar>
+numeric/conversion Fernando Cacciola <fernando_cacciola -at- ciudad.com.ar>, Brandon Kohn <blkohn -at- hotmail.com>
 numeric/interval Sylvain Pion <Sylvain.Pion -at- sophia.inria.fr>, Herve Bronnimann <hbr -at- poly.edu>, Guillaume Melquiond <guillaume.melquiond -at- ens-lyon.fr>
 numeric/ublas Michael Stevens <michael -at- michael-stevens.de>
 optional Fernando Cacciola <fernando_cacciola -at- ciudad.com.ar>

Modified: branches/release/libs/numeric/conversion/doc/numeric_cast.qbk
==============================================================================
--- branches/release/libs/numeric/conversion/doc/numeric_cast.qbk (original)
+++ branches/release/libs/numeric/conversion/doc/numeric_cast.qbk 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -34,7 +34,7 @@
 aforementioned unsigned to unsigned) makes any code that may produce
 positive or negative overflows exposed to portability issues.
 
-`numeric_cast` adheres to the rules for implicit conversions mandated by
+By default `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
@@ -43,17 +43,28 @@
 [endsect]
 
 [section numeric_cast]
-
- template<typename Target, typename Source> inline
- typename boost::numeric::converter<Target,Source>::result_type
- numeric_cast ( Source arg )
+
+ template <typename Target, typename Source> inline
+ Target numeric_cast( Source arg )
     {
- return boost::numeric::converter<Target,Source>::convert(arg);
+ typedef conversion_traits<Target, Source> conv_traits;
+ typedef numeric_cast_traits<Target, Source> cast_traits;
+ typedef converter
+ <
+ Target,
+ Source,
+ conv_traits,
+ typename cast_traits::overflow_policy,
+ typename cast_traits::rounding_policy,
+ raw_converter<conv_traits>,
+ typename cast_traits::range_checking_policy
+ > converter;
+ return converter::convert(arg);
     }
 
 `numeric_cast` 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
+to a value of type Target. If out-of-range is detected, an overflow policy
+is executed whose default behavior is to throw an an exception (see
 [link numeric_conversion_bad_numeric_cast bad_numeric_cast],
 [link numeric_conversion_negative_overflow negative_overflow] and
 [link numeric_conversion_possitive_overflow positive_overflow]
@@ -61,6 +72,24 @@
 
 [endsect]
 
+[section numeric_cast_traits]
+
+ template <typename Target, typename Source, typename EnableIf = void>
+ struct numeric_cast_traits
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<Source> rounding_policy;
+ };
+
+The behavior of `numeric_cast` may be tailored for custom numeric types through
+the specialization of `numeric_cast_traits`. (see
+[link boost_numericconversion.type_requirements_and_user_defined_types_support User Defined Types]
+for details.
+)
+
+[endsect]
+
 [section Examples]
 
 The following example performs some typical conversions between numeric types:

Modified: branches/release/libs/numeric/conversion/doc/requirements.qbk
==============================================================================
--- branches/release/libs/numeric/conversion/doc/requirements.qbk (original)
+++ branches/release/libs/numeric/conversion/doc/requirements.qbk 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -94,17 +94,355 @@
 
 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.
+used in place of the internal code. See
+[link boost_numericconversion.type_requirements_and_user_defined_types_support.udts_with_numeric_cast numeric_cast_traits]
+for details on using UDTs with `numeric_cast`.
 
 The converter class performs the actual conversion using a Raw Converter policy.
 The default raw converter simply performs a `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.
 
 [endsect]
 
+[section UDTs with numeric_cast]
+
+In order to employ UDTs with `numeric_cast`, the user should define
+a `numeric_cast_traits` specialization on the UDT for each conversion.
+Here is an example of specializations for converting between the UDT
+and any other type:
+
+ namespace boost { namespace numeric {
+ template <typename Source>
+ struct numeric_cast_traits<UDT, Source>
+ {
+ typedef conversion_traits<UDT, Source> conv_traits;
+
+ //! The following are required:
+ typedef YourOverflowHandlerPolicy overflow_policy;
+ typedef YourRangeCheckerPolicy<conv_traits> range_checking_policy;
+ typedef YourFloat2IntRounderPolicy<Source> rounding_policy;
+ };
+ template <typename Target>
+ struct numeric_cast_traits<Target, UDT>
+ {
+ typedef conversion_traits<Target, UDT> conv_traits;
+
+ //! The following are required:
+ typedef YourOverflowHandlerPolicy overflow_policy;
+ typedef YourRangeCheckerPolicy<conv_traits> range_checking_policy;
+ typedef YourFloat2IntRounderPolicy<UDT> rounding_policy;
+ };
+ }}//namespace boost::numeric;
+
+These specializations are already defined with default values for the built-in
+numeric types. It is possible to disable the generation of specializations for
+built-in types by defining `BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS`.
+For details on defining custom policies see [link boost_numericconversion.numeric_converter_policy_classes Converter Policies].
+
+Here is a full example of how to define a custom UDT for use with `numeric_cast`:
+
+ //! Define a simple custom number
+ struct Double
+ : boost::ordered_field_operators
+ <
+ Double
+ , boost::ordered_field_operators2< Double, long double
+ , boost::ordered_field_operators2< Double, double
+ , boost::ordered_field_operators2< Double, float
+ , boost::ordered_field_operators2< Double, int
+ , boost::ordered_field_operators2< Double, unsigned int
+ , boost::ordered_field_operators2< Double, long
+ , boost::ordered_field_operators2< Double, unsigned long
+ , boost::ordered_field_operators2< Double, long long
+ , boost::ordered_field_operators2< Double, unsigned long long
+ , boost::ordered_field_operators2< Double, char
+ , boost::ordered_field_operators2< Double, unsigned char
+ , boost::ordered_field_operators2< Double, short
+ , boost::ordered_field_operators2< Double, unsigned short
+ > > > > > > > > > > > > > >
+ {
+ Double()
+ : v(0)
+ {}
+
+ template <typename T>
+ explicit Double( T v )
+ : v(static_cast<double>(v))
+ {}
+
+ template <typename T>
+ Double& operator= ( T t )
+ {
+ v = static_cast<double>(t);
+ return *this;
+ }
+
+ bool operator < ( const Double& rhs ) const
+ {
+ return v < rhs.v;
+ }
+
+ template <typename T>
+ bool operator < ( T rhs ) const
+ {
+ return v < static_cast<double>(rhs);
+ }
+
+ bool operator > ( const Double& rhs ) const
+ {
+ return v > rhs.v;
+ }
+
+ template <typename T>
+ bool operator > ( T rhs ) const
+ {
+ return v > static_cast<double>(rhs);
+ }
+
+ bool operator ==( const Double& rhs ) const
+ {
+ return v == rhs.v;
+ }
+
+ template <typename T>
+ bool operator == ( T rhs ) const
+ {
+ return v == static_cast<double>(rhs);
+ }
+
+ bool operator !() const
+ {
+ return v == 0;
+ }
+
+ Double operator -() const
+ {
+ return Double(-v);
+ }
+
+ Double& operator +=( const Double& t )
+ {
+ v += t.v;
+ return *this;
+ }
+
+ template <typename T>
+ Double& operator +=( T t )
+ {
+ v += static_cast<double>(t);
+ return *this;
+ }
+
+ Double& operator -=( const Double& t )
+ {
+ v -= t.v;
+ return *this;
+ }
+
+ template <typename T>
+ Double& operator -=( T t )
+ {
+ v -= static_cast<double>(t);
+ return *this;
+ }
+
+ Double& operator *= ( const Double& factor )
+ {
+ v *= factor.v;
+ return *this;
+ }
+
+ template <typename T>
+ Double& operator *=( T t )
+ {
+ v *= static_cast<double>(t);
+ return *this;
+ }
+
+ Double& operator /= (const Double& divisor)
+ {
+ v /= divisor.v;
+ return *this;
+ }
+
+ template <typename T>
+ Double& operator /=( T t )
+ {
+ v /= static_cast<double>(t);
+ return (*this);
+ }
+
+ double v;
+ };
+
+ //! Define numeric_limits for the custom type.
+ namespace std
+ {
+ template<>
+ class numeric_limits<Double> : public numeric_limits<double>
+ {
+ public:
+
+ //! Limit our Double to a range of +/- 100.0
+ static Double (min)()
+ {
+ return Double(1.e-2);
+ }
+
+ static Double (max)()
+ {
+ return Double(1.e2);
+ }
+
+ static Double epsilon()
+ {
+ return Double( std::numeric_limits<double>::epsilon() );
+ }
+ };
+ }
+
+ //! Define range checking and overflow policies.
+ namespace custom
+ {
+ //! Define a custom range checker
+ template<typename Traits, typename OverFlowHandler>
+ struct range_checker
+ {
+ typedef typename Traits::argument_type argument_type ;
+ typedef typename Traits::source_type S;
+ typedef typename Traits::target_type T;
+
+ //! Check range of integral types.
+ static boost::numeric::range_check_result out_of_range( argument_type s )
+ {
+ using namespace boost::numeric;
+ if( s > bounds<T>::highest() )
+ return cPosOverflow;
+ else if( s < bounds<T>::lowest() )
+ return cNegOverflow;
+ else
+ return cInRange;
+ }
+
+ static void validate_range ( argument_type s )
+ {
+ BOOST_STATIC_ASSERT( std::numeric_limits<T>::is_bounded );
+ OverFlowHandler()( out_of_range(s) );
+ }
+ };
+
+ //! Overflow handler
+ struct positive_overflow{};
+ struct negative_overflow{};
+
+ struct overflow_handler
+ {
+ void operator() ( boost::numeric::range_check_result r )
+ {
+ using namespace boost::numeric;
+ if( r == cNegOverflow )
+ throw negative_overflow() ;
+ else if( r == cPosOverflow )
+ throw positive_overflow() ;
+ }
+ };
+
+ //! Define a rounding policy and specialize on the custom type.
+ template<class S>
+ struct Ceil : boost::numeric::Ceil<S>{};
+
+ template<>
+ struct Ceil<Double>
+ {
+ typedef Double source_type;
+
+ typedef Double const& argument_type;
+
+ static source_type nearbyint ( argument_type s )
+ {
+ #if !defined(BOOST_NO_STDC_NAMESPACE)
+ using std::ceil ;
+ #endif
+ return Double( ceil(s.v) );
+ }
+
+ typedef boost::mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style;
+ };
+
+ //! Define a rounding policy and specialize on the custom type.
+ template<class S>
+ struct Trunc: boost::numeric::Trunc<S>{};
+
+ template<>
+ struct Trunc<Double>
+ {
+ typedef Double source_type;
+
+ typedef Double const& argument_type;
+
+ static source_type nearbyint ( argument_type s )
+ {
+ #if !defined(BOOST_NO_STDC_NAMESPACE)
+ using std::floor;
+ #endif
+ return Double( floor(s.v) );
+ }
+
+ typedef boost::mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style;
+ };
+ }//namespace custom;
+
+ namespace boost { namespace numeric {
+
+ //! Define the numeric_cast_traits specializations on the custom type.
+ template <typename S>
+ struct numeric_cast_traits<Double, S>
+ {
+ typedef custom::overflow_handler overflow_policy;
+ typedef custom::range_checker
+ <
+ boost::numeric::conversion_traits<Double, S>
+ , overflow_policy
+ > range_checking_policy;
+ typedef boost::numeric::Trunc<S> rounding_policy;
+ };
+
+ template <typename T>
+ struct numeric_cast_traits<T, Double>
+ {
+ typedef custom::overflow_handler overflow_policy;
+ typedef custom::range_checker
+ <
+ boost::numeric::conversion_traits<T, Double>
+ , overflow_policy
+ > range_checking_policy;
+ typedef custom::Trunc<Double> rounding_policy;
+ };
+
+ //! Define the conversion from the custom type to built-in types and vice-versa.
+ template<typename T>
+ struct raw_converter< conversion_traits< T, Double > >
+ {
+ static T low_level_convert ( const Double& n )
+ {
+ return static_cast<T>( n.v );
+ }
+ };
+
+ template<typename S>
+ struct raw_converter< conversion_traits< Double, S > >
+ {
+ static Double low_level_convert ( const S& n )
+ {
+ return Double(n);
+ }
+ };
+ }}//namespace boost::numeric;
+
+[endsect]
+
 [endsect]
 

Modified: branches/release/libs/numeric/conversion/test/Jamfile.v2
==============================================================================
--- branches/release/libs/numeric/conversion/test/Jamfile.v2 (original)
+++ branches/release/libs/numeric/conversion/test/Jamfile.v2 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -5,6 +5,16 @@
 # Distributed under the Boost Software License, Version 1.0. (See
 # accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt)
+#
+# import testing ;
+
+project numeric_conversion_unit_tests
+ :
+ requirements
+ <include>.
+ <toolset>gcc:<cxxflags>"-ftemplate-depth-300 -g0"
+ <toolset>darwin:<cxxflags>"-ftemplate-depth-300 -g0"
+ ;
 
   test-suite numeric/conversion :
      [ run bounds_test.cpp ]
@@ -13,5 +23,10 @@
      [ run udt_support_test.cpp ]
      [ run numeric_cast_test.cpp ]
      [ run udt_example_0.cpp ]
+ [ run numeric_cast_traits_test.cpp ]
+ ;
+
+ test-suite "compile_fail_test" :
+ [ compile-fail compile_fail/built_in_numeric_cast_traits.cpp ]
   ;
 

Copied: branches/release/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp (from r73675, /trunk/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp)
==============================================================================
--- /trunk/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp (original)
+++ branches/release/libs/numeric/conversion/test/compile_fail/built_in_numeric_cast_traits.cpp 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -1,5 +1,5 @@
 //
-//! Copyright © 2011
+//! Copyright (c) 2011
 //! Brandon Kohn
 //
 // Distributed under the Boost Software License, Version 1.0. (See

Copied: branches/release/libs/numeric/conversion/test/numeric_cast_traits_test.cpp (from r73675, /trunk/libs/numeric/conversion/test/numeric_cast_traits_test.cpp)
==============================================================================
--- /trunk/libs/numeric/conversion/test/numeric_cast_traits_test.cpp (original)
+++ branches/release/libs/numeric/conversion/test/numeric_cast_traits_test.cpp 2011-10-06 13:27:17 EDT (Thu, 06 Oct 2011)
@@ -1,5 +1,5 @@
 //
-//! Copyright © 2011
+//! Copyright (c) 2011
 //! Brandon Kohn
 //
 // Distributed under the Boost Software License, Version 1.0. (See
@@ -16,26 +16,6 @@
 
 //! Define a simple custom number
 struct Double
- : boost::ordered_field_operators
- <
- Double
- , boost::ordered_field_operators2< Double, long double
- , boost::ordered_field_operators2< Double, double
- , boost::ordered_field_operators2< Double, float
- , boost::ordered_field_operators2< Double, boost::int8_t
- , boost::ordered_field_operators2< Double, boost::uint8_t
- , boost::ordered_field_operators2< Double, boost::int16_t
- , boost::ordered_field_operators2< Double, boost::uint16_t
- , boost::ordered_field_operators2< Double, boost::int32_t
- , boost::ordered_field_operators2< Double, boost::uint32_t
-#if !defined( BOOST_NO_INT64_T )
- , boost::ordered_field_operators2< Double, boost::int64_t
- , boost::ordered_field_operators2< Double, boost::uint64_t
-#endif
- > > > > > > > > > >
-#if !defined( BOOST_NO_INT64_T )
- > >
-#endif
 {
     Double()
         : v(0)
@@ -64,10 +44,22 @@
         return v < static_cast<double>(rhs);
     }
 
+ template <typename LHS>
+ friend bool operator < ( const LHS& lhs, const Double& rhs )
+ {
+ return lhs < rhs.v;
+ }
+
     bool operator > ( const Double& rhs ) const
     {
         return v > rhs.v;
     }
+
+ template <typename LHS>
+ friend bool operator > ( const LHS& lhs, const Double& rhs )
+ {
+ return lhs > rhs.v;
+ }
     
     template <typename T>
     bool operator > ( T rhs ) const
@@ -75,7 +67,7 @@
         return v > static_cast<double>(rhs);
     }
     
- bool operator ==( const Double& rhs ) const
+ bool operator == ( const Double& rhs ) const
     {
         return v == rhs.v;
     }
@@ -85,6 +77,12 @@
     {
         return v == static_cast<double>(rhs);
     }
+
+ template <typename LHS>
+ friend bool operator == ( const LHS& lhs, const Double& rhs )
+ {
+ return lhs == rhs.v;
+ }
     
     bool operator !() const
     {
@@ -341,31 +339,29 @@
 
 void test_numeric_cast_traits()
 {
- using namespace boost;
- using namespace boost::numeric;
- typedef mpl::vector
+ typedef boost::mpl::vector
         <
- int8_t
- , uint8_t
- , int16_t
- , uint16_t
- , int32_t
- , uint32_t
+ boost::int8_t
+ , boost::uint8_t
+ , boost::int16_t
+ , boost::uint16_t
+ , boost::int32_t
+ , boost::uint32_t
 #if !defined( BOOST_NO_INT64_T )
- , int64_t
- , uint64_t
+ , boost::int64_t
+ , boost::uint64_t
 #endif
           , float
           , double
           , long double
> types;
- mpl::for_each<types>( test_cast_traits() );
+ boost::mpl::for_each<types>( test_cast_traits() );
         
     //! Check overflow handler.
     Double d( 56.0 );
- BOOST_TEST_CATCH_CUSTOM_POSITIVE_OVERFLOW( d = numeric_cast<Double>( 101 ) );
+ BOOST_TEST_CATCH_CUSTOM_POSITIVE_OVERFLOW( d = boost::numeric_cast<Double>( 101 ) );
     BOOST_CHECK( d.v == 56. );
- BOOST_TEST_CATCH_CUSTOM_NEGATIVE_OVERFLOW( d = numeric_cast<Double>( -101 ) );
+ BOOST_TEST_CATCH_CUSTOM_NEGATIVE_OVERFLOW( d = boost::numeric_cast<Double>( -101 ) );
     BOOST_CHECK( d.v == 56.);
 
     //! Check custom round policy.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk