mirror of
https://github.com/boostorg/system.git
synced 2025-12-27 01:08:18 +01:00
Compare commits
5 Commits
feature/op
...
boost-1.74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8220aa5700 | ||
|
|
f00c76a3fc | ||
|
|
73bf30ae04 | ||
|
|
63ac7fb9bc | ||
|
|
feb545a919 |
38
.travis.yml
38
.travis.yml
@@ -127,6 +127,17 @@ matrix:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: g++-10
|
||||
env: TOOLSET=gcc COMPILER=g++-10 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-10
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-9
|
||||
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||
@@ -275,15 +286,30 @@ matrix:
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-8
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||
dist: xenial
|
||||
compiler: clang++-10
|
||||
env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-8
|
||||
- clang-10
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-8
|
||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang++-10
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-10
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
@@ -311,6 +337,10 @@ matrix:
|
||||
compiler: clang++
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||
|
||||
- os: freebsd
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,17,2a
|
||||
|
||||
- os: linux
|
||||
env: CMAKE=1
|
||||
script:
|
||||
|
||||
@@ -47,23 +47,23 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual const char * name() const BOOST_NOEXCEPT
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
{
|
||||
return pc_->name();
|
||||
}
|
||||
|
||||
virtual std::string message( int ev ) const
|
||||
std::string message( int ev ) const BOOST_OVERRIDE
|
||||
{
|
||||
return pc_->message( ev );
|
||||
}
|
||||
|
||||
virtual std::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT
|
||||
std::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
{
|
||||
return pc_->default_error_condition( ev );
|
||||
}
|
||||
|
||||
virtual bool equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT;
|
||||
virtual bool equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT;
|
||||
bool equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
bool equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#if !defined(__SUNPRO_CC) // trailing __global is not supported
|
||||
|
||||
@@ -287,13 +287,13 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
const char * name() const BOOST_NOEXCEPT
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
{
|
||||
return "generic";
|
||||
}
|
||||
|
||||
std::string message( int ev ) const;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
|
||||
std::string message( int ev ) const BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
class BOOST_SYMBOL_VISIBLE system_error_category: public error_category
|
||||
@@ -305,15 +305,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
const char * name() const BOOST_NOEXCEPT
|
||||
const char * name() const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
{
|
||||
return "system";
|
||||
}
|
||||
|
||||
error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT;
|
||||
error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
|
||||
std::string message( int ev ) const;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
|
||||
std::string message( int ev ) const BOOST_OVERRIDE;
|
||||
char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace boost
|
||||
virtual ~system_error() BOOST_NOEXCEPT_OR_NOTHROW {}
|
||||
|
||||
error_code code() const BOOST_NOEXCEPT { return m_error_code; }
|
||||
const char * what() const BOOST_NOEXCEPT_OR_NOTHROW;
|
||||
const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE;
|
||||
|
||||
private:
|
||||
error_code m_error_code;
|
||||
|
||||
@@ -61,7 +61,11 @@ system-run failed_constexpr_test.cpp ;
|
||||
# Quick (CI) test
|
||||
run quick.cpp ;
|
||||
|
||||
run warnings_test.cpp : : : <warnings>all <warnings-as-errors>on <toolset>gcc:<cxxflags>-Wnon-virtual-dtor <toolset>clang:<cxxflags>-Wnon-virtual-dtor ;
|
||||
compile warnings_test.cpp
|
||||
: <warnings>pedantic
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on ;
|
||||
|
||||
lib std_single_instance_lib1 : std_single_instance_1.cpp : <link>shared:<define>STD_SINGLE_INSTANCE_DYN_LINK ;
|
||||
lib std_single_instance_lib2 : std_single_instance_2.cpp : <link>shared:<define>STD_SINGLE_INSTANCE_DYN_LINK ;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
// See library home page at http://www.boost.org/libs/system
|
||||
|
||||
#include <boost/system/system_error.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <cerrno>
|
||||
@@ -32,5 +33,10 @@ int main()
|
||||
|
||||
BOOST_TEST( bc == bn );
|
||||
|
||||
boost::system::system_error x( bc, "prefix" );
|
||||
|
||||
BOOST_TEST_EQ( x.code(), bc );
|
||||
BOOST_TEST_EQ( std::string( x.what() ), "prefix: " + bc.message() );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -8,12 +8,17 @@
|
||||
|
||||
// See library home page at http://www.boost.org/libs/system
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 5 && __cplusplus >= 201103L
|
||||
# pragma GCC diagnostic error "-Wsuggest-override"
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined( BOOST_GCC ) && BOOST_GCC < 40600
|
||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#endif
|
||||
|
||||
#include <boost/system/system_error.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <cerrno>
|
||||
@@ -38,5 +43,10 @@ int main()
|
||||
|
||||
BOOST_TEST( bc == bn );
|
||||
|
||||
boost::system::system_error x( bc, "prefix" );
|
||||
|
||||
BOOST_TEST_EQ( x.code(), bc );
|
||||
BOOST_TEST_EQ( std::string( x.what() ), "prefix: " + bc.message() );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user