From 3653a5cd92167a4998fb8bb975b9e60c4db139d7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jun 2016 18:50:51 +0200 Subject: Get rid of C++11 deprecation warnings for auto_ptr, exception specs In particular, std::auto_ptr is no longer mapped in C++11. --- odb/mysql/database.hxx | 1 - odb/mysql/exceptions.cxx | 8 ++++---- odb/mysql/exceptions.hxx | 9 +++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/odb/mysql/database.hxx b/odb/mysql/database.hxx index a0e3bd6..e4be465 100644 --- a/odb/mysql/database.hxx +++ b/odb/mysql/database.hxx @@ -8,7 +8,6 @@ #include #include -#include // std::auto_ptr, std::unique_ptr #include // std::ostream #include diff --git a/odb/mysql/exceptions.cxx b/odb/mysql/exceptions.cxx index 7d5fb67..fe3aa8c 100644 --- a/odb/mysql/exceptions.cxx +++ b/odb/mysql/exceptions.cxx @@ -17,7 +17,7 @@ namespace odb // database_exception:: - ~database_exception () throw () + ~database_exception () ODB_NOTHROW_NOEXCEPT { } @@ -31,7 +31,7 @@ namespace odb } const char* database_exception:: - what () const throw () + what () const ODB_NOTHROW_NOEXCEPT { return what_.c_str (); } @@ -53,12 +53,12 @@ namespace odb } cli_exception:: - ~cli_exception () throw () + ~cli_exception () ODB_NOTHROW_NOEXCEPT { } const char* cli_exception:: - what () const throw () + what () const ODB_NOTHROW_NOEXCEPT { return what_.c_str (); } diff --git a/odb/mysql/exceptions.hxx b/odb/mysql/exceptions.hxx index e88fae8..35329a8 100644 --- a/odb/mysql/exceptions.hxx +++ b/odb/mysql/exceptions.hxx @@ -10,6 +10,7 @@ #include #include +#include // ODB_NOTHROW_NOEXCEPT #include #include @@ -26,7 +27,7 @@ namespace odb const std::string& sqlstate, const std::string& message); - ~database_exception () throw (); + ~database_exception () ODB_NOTHROW_NOEXCEPT; unsigned int error () const @@ -47,7 +48,7 @@ namespace odb } virtual const char* - what () const throw (); + what () const ODB_NOTHROW_NOEXCEPT; virtual database_exception* clone () const; @@ -62,10 +63,10 @@ namespace odb struct LIBODB_MYSQL_EXPORT cli_exception: odb::exception { cli_exception (const std::string& what); - ~cli_exception () throw (); + ~cli_exception () ODB_NOTHROW_NOEXCEPT; virtual const char* - what () const throw (); + what () const ODB_NOTHROW_NOEXCEPT; virtual cli_exception* clone () const; -- cgit v1.1