forked from boostorg/system
Upgrade system and filesystem to conform system_category and generic_category interface to N3090, the current C++0x working paper, section 19.5, System error support.
Refactor API macros into a new header, boost/system/api_config.hpp. Prohibit user definition of API macros. Rationale: ensure all translation units use same definitions, cut number of environments that need to be tested. [SVN r62313]
This commit is contained in:
+15
-15
@@ -37,7 +37,7 @@ namespace
|
||||
{
|
||||
std::cout << "test " << desc << "\n what() returns \"" << ex.what() << "\"\n";
|
||||
BOOST_TEST( ex.code().value() == v );
|
||||
BOOST_TEST( ex.code().category() == system_category );
|
||||
BOOST_TEST( ex.code().category() == system_category() );
|
||||
# ifdef BOOST_WINDOWS_API
|
||||
LANGID language_id;
|
||||
# if !defined(__MINGW32__) && !defined(__CYGWIN__)
|
||||
@@ -63,25 +63,25 @@ int main( int, char *[] )
|
||||
{
|
||||
// all constructors, in the same order as they appear in the header:
|
||||
|
||||
system_error c1_0( error_code(0, system_category) );
|
||||
system_error c1_1( error_code(1, system_category) );
|
||||
system_error c1_2u( error_code(uvalue, system_category) );
|
||||
system_error c1_0( error_code(0, system_category()) );
|
||||
system_error c1_1( error_code(1, system_category()) );
|
||||
system_error c1_2u( error_code(uvalue, system_category()) );
|
||||
|
||||
system_error c2_0( error_code(0, system_category), string("c2_0") );
|
||||
system_error c2_1( error_code(1, system_category), string("c2_1") );
|
||||
system_error c2_0( error_code(0, system_category()), string("c2_0") );
|
||||
system_error c2_1( error_code(1, system_category()), string("c2_1") );
|
||||
|
||||
system_error c3_0( error_code(0, system_category), "c3_0" );
|
||||
system_error c3_1( error_code(1, system_category), "c3_1" );
|
||||
system_error c3_0( error_code(0, system_category()), "c3_0" );
|
||||
system_error c3_1( error_code(1, system_category()), "c3_1" );
|
||||
|
||||
system_error c4_0( 0, system_category );
|
||||
system_error c4_1( 1, system_category );
|
||||
system_error c4_2u( uvalue, system_category );
|
||||
system_error c4_0( 0, system_category() );
|
||||
system_error c4_1( 1, system_category() );
|
||||
system_error c4_2u( uvalue, system_category() );
|
||||
|
||||
system_error c5_0( 0, system_category, string("c5_0") );
|
||||
system_error c5_1( 1, system_category, string("c5_1") );
|
||||
system_error c5_0( 0, system_category(), string("c5_0") );
|
||||
system_error c5_1( 1, system_category(), string("c5_1") );
|
||||
|
||||
system_error c6_0( 0, system_category, "c6_0" );
|
||||
system_error c6_1( 1, system_category, "c6_1" );
|
||||
system_error c6_0( 0, system_category(), "c6_0" );
|
||||
system_error c6_1( 1, system_category(), "c6_1" );
|
||||
|
||||
TEST( c1_0, 0, "The operation completed successfully" );
|
||||
TEST( c1_1, 1, "Incorrect function" );
|
||||
|
||||
Reference in New Issue
Block a user