Boost logo

Boost-Commit :

From: bdawes_at_[hidden]
Date: 2007-09-20 17:04:35


Author: bemandawes
Date: 2007-09-20 17:04:34 EDT (Thu, 20 Sep 2007)
New Revision: 39428
URL: http://svn.boost.org/trac/boost/changeset/39428

Log:
Strictly conforming compilers (EDG with --dep_name) require the make_* functions be defined before used. Report and fix from Markus Schopflin. EDG info from Boris Gubenko.
Text files modified:
   trunk/boost/system/error_code.hpp | 12 ++++++++++--
   1 files changed, 10 insertions(+), 2 deletions(-)

Modified: trunk/boost/system/error_code.hpp
==============================================================================
--- trunk/boost/system/error_code.hpp (original)
+++ trunk/boost/system/error_code.hpp 2007-09-20 17:04:34 EDT (Thu, 20 Sep 2007)
@@ -172,6 +172,10 @@
     static const error_category & errno_ecat = get_posix_category();
     static const error_category & native_ecat = get_system_category();
 
+ // EDG with --dep_name requires make_error_condition be defined before use
+
+ template <class T> error_condition make_error_condition(T);
+
     // class error_condition -----------------------------------------------//
 
     // error_conditions are portable, error_codes are system or lib specific
@@ -255,6 +259,10 @@
 
     };
 
+ // EDG with --dep_name requires make_error_code be defined before use
+
+ template <class T> error_code make_error_code(T);
+
     // class error_code ----------------------------------------------------//
 
     // We want error_code to be a value type that can be copied without slicing
@@ -401,11 +409,11 @@
     // make_* functions for posix::posix_errno -----------------------------//
 
     // explicit conversion:
- inline error_code make_error_code( posix::posix_errno e )
+ template<> inline error_code make_error_code( posix::posix_errno e )
       { return error_code( e, posix_category ); }
 
     // implicit conversion:
- inline error_condition make_error_condition( posix::posix_errno e )
+ template<> inline error_condition make_error_condition( posix::posix_errno e )
       { return error_condition( e, posix_category ); }
 
     // error_category default implementation -------------------------------//


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