|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66263 - in sandbox/chrono/boost/system: . detail/inlined
From: vicente.botet_at_[hidden]
Date: 2010-10-30 08:10:17
Author: viboes
Date: 2010-10-30 08:10:15 EDT (Sat, 30 Oct 2010)
New Revision: 66263
URL: http://svn.boost.org/trac/boost/changeset/66263
Log:
Chrono: Some fixes in Implementation of header only Boost.System
Text files modified:
sandbox/chrono/boost/system/detail/inlined/error_code.hpp | 10 +++++-----
sandbox/chrono/boost/system/error_code.hpp | 20 ++++++++++++--------
sandbox/chrono/boost/system/system_error.hpp | 4 ++--
3 files changed, 19 insertions(+), 15 deletions(-)
Modified: sandbox/chrono/boost/system/detail/inlined/error_code.hpp
==============================================================================
--- sandbox/chrono/boost/system/detail/inlined/error_code.hpp (original)
+++ sandbox/chrono/boost/system/detail/inlined/error_code.hpp 2010-10-30 08:10:15 EDT (Sat, 30 Oct 2010)
@@ -50,17 +50,17 @@
{
public:
generic_error_category(){}
- const char * name() const;
- std::string message( int ev ) const;
+ BOOST_SYSTEM_INLINE const char * name() const;
+ BOOST_SYSTEM_INLINE std::string message( int ev ) const;
};
class system_error_category : public error_category
{
public:
system_error_category(){}
- const char * name() const;
- std::string message( int ev ) const;
- error_condition default_error_condition( int ev ) const;
+ BOOST_SYSTEM_INLINE const char * name() const;
+ BOOST_SYSTEM_INLINE std::string message( int ev ) const;
+ BOOST_SYSTEM_INLINE error_condition default_error_condition( int ev ) const;
};
// generic_error_category implementation ---------------------------------//
Modified: sandbox/chrono/boost/system/error_code.hpp
==============================================================================
--- sandbox/chrono/boost/system/error_code.hpp (original)
+++ sandbox/chrono/boost/system/error_code.hpp 2010-10-30 08:10:15 EDT (Sat, 30 Oct 2010)
@@ -21,6 +21,7 @@
#include <string>
#include <stdexcept>
#include <functional>
+#include <assert.h>
// TODO: undef these macros if not already defined
#include <boost/cerrno.hpp>
@@ -29,7 +30,15 @@
# error BOOST_SYSTEM_POSIX_API or BOOST_SYSTEM_WINDOWS_API must be defined
#endif
+# ifdef BOOST_ERROR_CODE_HEADER_ONLY
+# ifndef BOOST_SYSTEM_INLINED
+# define BOOST_SYSTEM_INLINED
+# endif
+# endif
+
+#ifndef BOOST_SYSTEM_INLINED
#include <boost/config/abi_prefix.hpp> // must be the last #include
+#endif
namespace boost
{
@@ -397,7 +406,9 @@
} // namespace system
- namespace detail { inline system::error_code * throws() { return 0; } }
+ namespace detail {
+ inline system::error_code * throws() { return 0; }
+ }
// Misuse of the error_code object is turned into a noisy failure by
// poisoning the reference. This particular implementation doesn't
// produce warnings or errors from popular compilers, is very efficient
@@ -405,7 +416,6 @@
// from order of initialization problems. In practice, it also seems
// cause user function error handling implementation errors to be detected
// very early in the development cycle.
-
inline system::error_code & throws()
{ return *detail::throws(); }
@@ -504,12 +514,6 @@
//#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
//
-# ifdef BOOST_ERROR_CODE_HEADER_ONLY
-# ifndef BOOST_SYSTEM_INLINED
-# define BOOST_SYSTEM_INLINED
-# endif
-//# include <boost/../libs/system/src/error_code.cpp>
-# endif
#ifndef BOOST_SYSTEM_INLINED
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
Modified: sandbox/chrono/boost/system/system_error.hpp
==============================================================================
--- sandbox/chrono/boost/system/system_error.hpp (original)
+++ sandbox/chrono/boost/system/system_error.hpp 2010-10-30 08:10:15 EDT (Sat, 30 Oct 2010)
@@ -47,7 +47,7 @@
virtual ~system_error() throw() {}
const error_code & code() const throw() { return m_error_code; }
- const char * what() const throw();
+ inline const char * what() const throw();
private:
error_code m_error_code;
@@ -56,7 +56,7 @@
// implementation ------------------------------------------------------//
- inline const char * system_error::what() const throw()
+ const char * system_error::what() const throw()
// see http://www.boost.org/more/error_handling.html for lazy build rationale
{
if ( m_what.empty() )
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