diff --git a/doc/quoted_manip.html b/doc/quoted_manip.html index c3e7362..14a3380 100644 --- a/doc/quoted_manip.html +++ b/doc/quoted_manip.html @@ -83,17 +83,20 @@ be preceded by an escape character, as will the escape character itself:

// manipulator for const std::basic_string& template <class Char, class Traits, class Alloc> - unspecified-type1 quoted(const std::basic_string<Char, Traits, Alloc>& string, Char escape='\\', Char delim='\"'); + unspecified-type1 quoted(const std::basic_string<Char, Traits, Alloc>& string, + Char escape='\\', Char delim='\"'); // manipulator for const C-string* template <class Char> - unspecified-type2 quoted(const Char* string, Char escape='\\', Char delim='\"'); + unspecified-type2 quoted(const Char* string, + Char escape='\\', Char delim='\"'); // manipulator for non-const std::basic_string& template <class Char, class Traits, class Alloc> - unspecified-type3 quoted(std::basic_string<Char, Traits, Alloc>& string, Char escape='\\', Char delim='\"'); + unspecified-type3 quoted(std::basic_string<Char, Traits, Alloc>& string, + Char escape='\\', Char delim='\"'); } }

unspecified_type1, unspecified_type2, @@ -155,7 +158,7 @@ form of the templates.

Distributed under the Boost Software License, Version 1.0. See www.boost.org/LICENSE_1_0.txt

Revised -20 June 2010

+08 March 2013

\ No newline at end of file diff --git a/meta/libraries.json b/meta/libraries.json new file mode 100644 index 0000000..1e2b3e9 --- /dev/null +++ b/meta/libraries.json @@ -0,0 +1,15 @@ +{ + "key": "io", + "name": "IO State Savers", + "authors": [ + "Daryle Walker" + ], + "description": "The I/O sub-library of Boost helps segregate the large number of Boost headers. This sub-library should contain various items to use with/for the standard I/O library.", + "documentation": "doc/ios_state.html", + "category": [ + "IO" + ], + "maintainers": [ + "Daryle Walker " + ] +} diff --git a/test/ios_state_test.cpp b/test/ios_state_test.cpp index 1f7fa84..79975f0 100644 --- a/test/ios_state_test.cpp +++ b/test/ios_state_test.cpp @@ -10,6 +10,7 @@ // 15 Jun 2003 Adjust to changes in Boost.Test (Daryle Walker) // 26 Feb 2002 Initial version (Daryle Walker) +#include #include // main, BOOST_CHECK, etc. #include // for boost::exit_success @@ -24,7 +25,9 @@ #include // for std::endl, std::ostream #include // for std::streambuf #include // for std::string - +#if defined(BOOST_GCC) || (defined(BOOST_CLANG) && defined(BOOST_GNU_STDLIB)) +#include +#endif // Facet with the bool names spelled backwards class backward_bool_names @@ -181,11 +184,15 @@ saver_tests_1 boost::io::ios_exception_saver const ies( output ); boost::io::ios_iostate_saver const iis( output ); - output.exceptions( ios_base::eofbit ); + output.exceptions( ios_base::eofbit | ios_base::badbit ); output.setstate( ios_base::eofbit ); BOOST_ERROR( "previous line should have thrown" ); } +#if defined(BOOST_GCC) || (defined(BOOST_CLANG) && defined(BOOST_GNU_STDLIB)) + catch ( std::exception &f ) +#else catch ( ios_base::failure &f ) +#endif { err << "Got the expected I/O failure: \"" << f.what() << "\".\n"; BOOST_CHECK( output.exceptions() == ios_base::goodbit ); @@ -243,7 +250,11 @@ saver_tests_2 BOOST_ERROR( "previous line should have thrown" ); } +#if defined(BOOST_GCC) || (defined(BOOST_CLANG) && defined(BOOST_GNU_STDLIB)) + catch ( std::exception &f ) +#else catch ( ios_base::failure &f ) +#endif { err << "Got the expected I/O failure: \"" << f.what() << "\".\n"; BOOST_CHECK( output.exceptions() == ios_base::goodbit ); diff --git a/test/ios_state_unit_test.cpp b/test/ios_state_unit_test.cpp index 72ce7b5..6aa2011 100644 --- a/test/ios_state_unit_test.cpp +++ b/test/ios_state_unit_test.cpp @@ -9,6 +9,7 @@ // Revision History // 12 Sep 2003 Initial version (Daryle Walker) +#include #include // for boost::io::ios_flags_saver, etc. #include // for main, BOOST_CHECK, etc. @@ -19,6 +20,9 @@ #include // for std::iostream #include // for std::locale, std::numpunct #include // for std::stringstream, etc. +#if defined(BOOST_GCC) || (defined(BOOST_CLANG) && defined(BOOST_GNU_STDLIB)) +#include +#endif // Global constants @@ -226,9 +230,14 @@ ios_exception_saver_unit_test { boost::io::ios_iostate_saver iis( ss ); + ss.exceptions( ios_base::failbit | ios_base::badbit ); char c; +#if defined(BOOST_GCC) || (defined(BOOST_CLANG) && defined(BOOST_GNU_STDLIB)) + BOOST_CHECK_THROW( ss >> c, std::exception ); +#else BOOST_CHECK_THROW( ss >> c, std::ios_base::failure ); +#endif } } @@ -575,9 +584,14 @@ ios_all_saver_unit_test { boost::io::ios_iostate_saver iis( ss ); + ss.exceptions( ios_base::failbit | ios_base::badbit ); char c; +#if defined(BOOST_GCC) || (defined(BOOST_CLANG) && defined(BOOST_GNU_STDLIB)) + BOOST_CHECK_THROW( ss >> c, std::exception ); +#else BOOST_CHECK_THROW( ss >> c, std::ios_base::failure ); +#endif } ss.tie( &clog ); @@ -639,14 +653,14 @@ ios_word_saver_unit_test // Unit test program -boost::unit_test_framework::test_suite * +boost::unit_test::test_suite * init_unit_test_suite ( int , // "argc" is unused char * [] // "argv" is unused ) { - boost::unit_test_framework::test_suite * test + boost::unit_test::test_suite * test = BOOST_TEST_SUITE( "I/O state saver test" ); test->add( BOOST_TEST_CASE(ios_flags_saver_unit_test) );