Initial commit

[SVN r16601]
This commit is contained in:
John Maddock
2002-12-13 11:14:29 +00:00
parent 6b980a5a2d
commit 941d72d8df

33
test/boost_no_ret_det.ipp Normal file
View File

@ -0,0 +1,33 @@
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// MACRO: BOOST_NO_UNREACHABLE_RETURN_DETECTION
// TITLE: detection of unreachable returns
// DESCRIPTION: If a return is unreachable, then no return
// statement should be required, however some
// compilers insist on it, while other issue a
// bunch of warnings if it is in fact present.
namespace boost_no_unreachable_return_detection{
int checker()
{
throw 0;
// no return statement: we don't ever get here...
}
int check = 0;
int test()
{
if(check)
return checker();
return 0;
}
}