mirror of
https://github.com/boostorg/system.git
synced 2025-11-03 17:21:54 +01:00
Turns out the --dep_name errors were due to functions in the wrong namespace (Chris Kohlhoff)
[SVN r39553]
This commit is contained in:
@@ -172,10 +172,6 @@ namespace boost
|
||||
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
|
||||
@@ -259,10 +255,6 @@ namespace boost
|
||||
|
||||
};
|
||||
|
||||
// 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
|
||||
@@ -408,13 +400,16 @@ namespace boost
|
||||
|
||||
// make_* functions for posix::posix_errno -----------------------------//
|
||||
|
||||
// explicit conversion:
|
||||
template<> inline error_code make_error_code( posix::posix_errno e )
|
||||
{ return error_code( e, posix_category ); }
|
||||
namespace posix
|
||||
{
|
||||
// explicit conversion:
|
||||
inline error_code make_error_code( posix_errno e )
|
||||
{ return error_code( e, posix_category ); }
|
||||
|
||||
// implicit conversion:
|
||||
template<> inline error_condition make_error_condition( posix::posix_errno e )
|
||||
{ return error_condition( e, posix_category ); }
|
||||
// implicit conversion:
|
||||
inline error_condition make_error_condition( posix_errno e )
|
||||
{ return error_condition( e, posix_category ); }
|
||||
}
|
||||
|
||||
// error_category default implementation -------------------------------//
|
||||
|
||||
@@ -496,8 +491,11 @@ namespace boost
|
||||
template<> struct is_error_code_enum<cygwin::cygwin_errno>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template<> inline error_code make_error_code(cygwin::cygwin_errno e)
|
||||
{ return error_code( e, system_category ); }
|
||||
namespace cygwin
|
||||
{
|
||||
inline error_code make_error_code( cygwin_errno e )
|
||||
{ return error_code( e, system_category ); }
|
||||
}
|
||||
|
||||
# elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||
|
||||
@@ -563,8 +561,11 @@ namespace boost
|
||||
template<> struct is_error_code_enum<Linux::linux_error>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template<> inline error_code make_error_code(Linux::linux_error e)
|
||||
{ return error_code( e, system_category ); }
|
||||
namespace Linux
|
||||
{
|
||||
inline error_code make_error_code( linux_error e )
|
||||
{ return error_code( e, system_category ); }
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
@@ -642,13 +643,17 @@ namespace boost
|
||||
|
||||
// TODO: add more Windows errors
|
||||
};
|
||||
|
||||
} // namespace windows
|
||||
|
||||
template<> struct is_error_code_enum<windows::windows_error>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template<> inline error_code make_error_code(windows::windows_error e)
|
||||
{ return error_code( e, system_category ); }
|
||||
namespace windows
|
||||
{
|
||||
inline error_code make_error_code( windows_error e )
|
||||
{ return error_code( e, system_category ); }
|
||||
}
|
||||
|
||||
#else
|
||||
# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
|
||||
|
||||
Reference in New Issue
Block a user