I am sponsoring a NMU that fixes this issue.
Please find the debdiff attached.
diff -Nru libodb-2.4.0/debian/changelog libodb-2.4.0/debian/changelog
--- libodb-2.4.0/debian/changelog 2015-05-24 15:55:04.000000000 +0200
+++ libodb-2.4.0/debian/changelog 2023-09-25 16:35:02.000000000 +0200
@@ -1,3 +1,10 @@
+libodb (2.4.0-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix gcc-11 build issue. (Closes: #984189)
+
+ -- Bo YU <tsu.y...@gmail.com> Mon, 25 Sep 2023 22:35:02 +0800
+
libodb (2.4.0-1) unstable; urgency=low
* Initial upload (closes: #786696).
diff -Nru libodb-2.4.0/debian/patches/fix-gcc-11-build-issue.patch
libodb-2.4.0/debian/patches/fix-gcc-11-build-issue.patch
--- libodb-2.4.0/debian/patches/fix-gcc-11-build-issue.patch 1970-01-01
01:00:00.000000000 +0100
+++ libodb-2.4.0/debian/patches/fix-gcc-11-build-issue.patch 2023-09-25
16:35:02.000000000 +0200
@@ -0,0 +1,1288 @@
+Origin: upstream, 13dd928ae18ef9610bc820b7b3e65629addea1d2
+From: Boris Kolpackov <bo...@codesynthesis.com>
+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/connection.hxx | 8 +--
+ odb/connection.ixx | 12 ++--
+ odb/database.hxx | 8 +--
+ odb/database.ixx | 12 ++--
+ odb/details/config-vc.h | 3 +
+ odb/details/config.hxx | 10 +++
+ odb/details/meta/polymorphic-p.hxx | 3 +-
+ odb/details/posix/exceptions.cxx | 2 +-
+ odb/details/posix/exceptions.hxx | 3 +-
+ odb/details/shared-ptr/base.cxx | 8 ++-
+ odb/details/shared-ptr/base.hxx | 20 +++++-
+ odb/details/shared-ptr/base.ixx | 18 +++++-
+ odb/details/shared-ptr/exception.hxx | 4 +-
+ odb/details/transfer-ptr.hxx | 26 ++++----
+ odb/details/win32/exceptions.cxx | 2 +-
+ odb/details/win32/exceptions.hxx | 5 +-
+ odb/exception.hxx | 3 +-
+ odb/exceptions.cxx | 56 ++++++++--------
+ odb/exceptions.hxx | 57 +++++++++--------
+ odb/lazy-pointer-traits.hxx | 2 +
+ odb/lazy-ptr.hxx | 23 +++----
+ odb/lazy-ptr.ixx | 120 ++++++++++++++++++-----------------
+ odb/pointer-traits.hxx | 2 +
+ odb/wrapper-traits.hxx | 2 +
+ 24 files changed, 235 insertions(+), 174 deletions(-)
+
+--- a/odb/connection.hxx
++++ b/odb/connection.hxx
+@@ -77,14 +77,14 @@
+ void
+ cache_query (const prepared_query<T>&);
+
+- template <typename T, typename P>
+- void
+- cache_query (const prepared_query<T>&, std::auto_ptr<P> params);
+-
+ #ifdef ODB_CXX11
+ template <typename T, typename P>
+ void
+ cache_query (const prepared_query<T>&, std::unique_ptr<P> params);
++#else
++ template <typename T, typename P>
++ void
++ cache_query (const prepared_query<T>&, std::auto_ptr<P> params);
+ #endif
+
+ template <typename T>
+--- a/odb/connection.ixx
++++ b/odb/connection.ixx
+@@ -64,24 +64,24 @@
+ cache_query_ (pq.impl_, typeid (T), 0, 0, 0);
+ }
+
++#ifdef ODB_CXX11
+ template <typename T, typename P>
+ inline void connection::
+- cache_query (const prepared_query<T>& pq, std::auto_ptr<P> params)
++ cache_query (const prepared_query<T>& pq, std::unique_ptr<P> params)
+ {
+ assert (pq);
+- assert (params.get () != 0);
++ assert (params);
+ cache_query_ (
+ pq.impl_, typeid (T), params.get (), &typeid (P), ¶ms_deleter<P>);
+ params.release ();
+ }
+-
+-#ifdef ODB_CXX11
++#else
+ template <typename T, typename P>
+ inline void connection::
+- cache_query (const prepared_query<T>& pq, std::unique_ptr<P> params)
++ cache_query (const prepared_query<T>& pq, std::auto_ptr<P> params)
+ {
+ assert (pq);
+- assert (params);
++ assert (params.get () != 0);
+ cache_query_ (
+ pq.impl_, typeid (T), params.get (), &typeid (P), ¶ms_deleter<P>);
+ params.release ();
+--- a/odb/database.hxx
++++ b/odb/database.hxx
+@@ -342,14 +342,14 @@
+ void
+ cache_query (const prepared_query<T>&);
+
+- template <typename T, typename P>
+- void
+- cache_query (const prepared_query<T>&, std::auto_ptr<P> params);
+-
+ #ifdef ODB_CXX11
+ template <typename T, typename P>
+ void
+ cache_query (const prepared_query<T>&, std::unique_ptr<P> params);
++#else
++ template <typename T, typename P>
++ void
++ cache_query (const prepared_query<T>&, std::auto_ptr<P> params);
+ #endif
+
+ template <typename T>
+--- a/odb/database.ixx
++++ b/odb/database.ixx
+@@ -684,21 +684,21 @@
+ c.cache_query (pq);
+ }
+
++#ifdef ODB_CXX11
+ template <typename T, typename P>
+ inline void database::
+- cache_query (const prepared_query<T>& pq, std::auto_ptr<P> params)
++ cache_query (const prepared_query<T>& pq, std::unique_ptr<P> params)
+ {
+ connection_type& c (transaction::current ().connection ());
+- c.cache_query (pq, params);
++ c.cache_query (pq, std::move (params));
+ }
+-
+-#ifdef ODB_CXX11
++#else
+ template <typename T, typename P>
+ inline void database::
+- cache_query (const prepared_query<T>& pq, std::unique_ptr<P> params)
++ cache_query (const prepared_query<T>& pq, std::auto_ptr<P> params)
+ {
+ connection_type& c (transaction::current ().connection ());
+- c.cache_query (pq, std::move (params));
++ c.cache_query (pq, params);
+ }
+ #endif
+
+--- a/odb/details/config-vc.h
++++ b/odb/details/config-vc.h
+@@ -24,6 +24,9 @@
+ # define ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT
+ # define ODB_CXX11_VARIADIC_TEMPLATE
+ # define ODB_CXX11_INITIALIZER_LIST
++# if _MSC_VER >= 1900
++# define ODB_CXX11_NOEXCEPT
++# endif
+ # endif
+ # endif
+ #endif
+--- a/odb/details/config.hxx
++++ b/odb/details/config.hxx
+@@ -16,6 +16,7 @@
+ # define ODB_CXX11
+ # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
+ # define ODB_CXX11_NULLPTR
++# define ODB_CXX11_NOEXCEPT
+ # endif
+ # define ODB_CXX11_DELETED_FUNCTION
+ # define ODB_CXX11_EXPLICIT_CONVERSION_OPERATOR
+@@ -46,6 +47,12 @@
+ # endif
+ #endif
+
++#ifdef ODB_CXX11_NOEXCEPT
++# define ODB_NOTHROW_NOEXCEPT noexcept
++#else
++# define ODB_NOTHROW_NOEXCEPT throw()
++#endif
++
+ // no post
+
+ #endif // ODB_DETAILS_CONFIG_HXX
+--- a/odb/details/meta/polymorphic-p.hxx
++++ b/odb/details/meta/polymorphic-p.hxx
+@@ -7,6 +7,7 @@
+
+ #include <odb/pre.hxx>
+
++#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/meta/class-p.hxx>
+ #include <odb/details/meta/remove-const-volatile.hxx>
+
+@@ -40,7 +41,7 @@
+ t2 ();
+
+ virtual
+- ~t2 () throw ();
++ ~t2 () ODB_NOTHROW_NOEXCEPT;
+ };
+
+ static const bool result = sizeof (t1) == sizeof (t2);
+--- a/odb/details/posix/exceptions.cxx
++++ b/odb/details/posix/exceptions.cxx
+@@ -9,7 +9,7 @@
+ namespace details
+ {
+ const char* posix_exception::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "POSIX API error";
+ }
+--- a/odb/details/posix/exceptions.hxx
++++ b/odb/details/posix/exceptions.hxx
+@@ -7,6 +7,7 @@
+
+ #include <odb/pre.hxx>
+
++#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/export.hxx>
+ #include <odb/details/exception.hxx>
+
+@@ -22,7 +23,7 @@
+ code () const {return code_;}
+
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual posix_exception*
+ clone () const;
+--- a/odb/details/shared-ptr/base.cxx
++++ b/odb/details/shared-ptr/base.cxx
+@@ -15,7 +15,7 @@
+ share exclusive = share (2);
+
+ const char* not_shared::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "object is not shared";
+ }
+@@ -54,7 +54,11 @@
+ }
+
+ void*
++#ifdef ODB_CXX11
++operator new (size_t n, odb::details::share s)
++#else
+ operator new (size_t n, odb::details::share s) throw (std::bad_alloc)
++#endif
+ {
+ if (s == odb::details::shared)
+ {
+@@ -74,7 +78,7 @@
+ }
+
+ void
+-operator delete (void* p, odb::details::share s) throw ()
++operator delete (void* p, odb::details::share s) ODB_NOTHROW_NOEXCEPT
+ {
+ // This version of operator delete is only called when the c-tor
+ // fails. In this case there is no object and we can just free the
+--- a/odb/details/shared-ptr/base.hxx
++++ b/odb/details/shared-ptr/base.hxx
+@@ -10,6 +10,7 @@
+ #include <new>
+ #include <cstddef> // std::size_t
+
++#include <odb/details/config.hxx> // ODB_CXX11, ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/export.hxx>
+ #include <odb/details/shared-ptr/counter-type.hxx>
+
+@@ -34,11 +35,16 @@
+ }
+ }
+
++#ifdef ODB_CXX11
++LIBODB_EXPORT void*
++operator new (std::size_t, odb::details::share);
++#else
+ LIBODB_EXPORT void*
+ operator new (std::size_t, odb::details::share) throw (std::bad_alloc);
++#endif
+
+ LIBODB_EXPORT void
+-operator delete (void*, odb::details::share) throw ();
++operator delete (void*, odb::details::share) ODB_NOTHROW_NOEXCEPT;
+
+ namespace odb
+ {
+@@ -61,17 +67,25 @@
+ std::size_t
+ _ref_count () const;
+
++#ifdef ODB_CXX11
++ void*
++ operator new (std::size_t);
++
++ void*
++ operator new (std::size_t, share);
++#else
+ void*
+ operator new (std::size_t) throw (std::bad_alloc);
+
+ void*
+ operator new (std::size_t, share) throw (std::bad_alloc);
++#endif
+
+ void
+- operator delete (void*, share) throw ();
++ operator delete (void*, share) ODB_NOTHROW_NOEXCEPT;
+
+ void
+- operator delete (void*) throw ();
++ operator delete (void*) ODB_NOTHROW_NOEXCEPT;
+
+ struct refcount_callback
+ {
+--- a/odb/details/shared-ptr/base.ixx
++++ b/odb/details/shared-ptr/base.ixx
+@@ -63,6 +63,19 @@
+ return counter_;
+ }
+
++#ifdef ODB_CXX11
++ inline void* shared_base::
++ operator new (std::size_t n)
++ {
++ return ::operator new (n);
++ }
++
++ inline void* shared_base::
++ operator new (std::size_t n, share)
++ {
++ return ::operator new (n);
++ }
++#else
+ inline void* shared_base::
+ operator new (std::size_t n) throw (std::bad_alloc)
+ {
+@@ -74,15 +87,16 @@
+ {
+ return ::operator new (n);
+ }
++#endif
+
+ inline void shared_base::
+- operator delete (void* p, share) throw ()
++ operator delete (void* p, share) ODB_NOTHROW_NOEXCEPT
+ {
+ ::operator delete (p);
+ }
+
+ inline void shared_base::
+- operator delete (void* p) throw ()
++ operator delete (void* p) ODB_NOTHROW_NOEXCEPT
+ {
+ ::operator delete (p);
+ }
+--- a/odb/details/shared-ptr/exception.hxx
++++ b/odb/details/shared-ptr/exception.hxx
+@@ -8,6 +8,8 @@
+ #include <odb/pre.hxx>
+
+ #include <odb/exception.hxx>
++
++#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/export.hxx>
+
+ namespace odb
+@@ -17,7 +19,7 @@
+ struct LIBODB_EXPORT not_shared: exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual not_shared*
+ clone () const;
+--- a/odb/details/transfer-ptr.hxx
++++ b/odb/details/transfer-ptr.hxx
+@@ -23,10 +23,22 @@
+
+ transfer_ptr (): p_ (0) {}
+
++#ifndef ODB_CXX11
+ template <typename T1>
+ transfer_ptr (std::auto_ptr<T1> p): p_ (p.release ()) {}
+
+-#ifdef ODB_CXX11
++ private:
++ transfer_ptr& operator= (const transfer_ptr&);
++
++ public:
++ // In our usage transfer_ptr is always created implicitly and
++ // never const. So while this is not very clean, it is legal.
++ // Plus it will all go away once we drop C++98 (I can hardly
++ // wait).
++ //
++ transfer_ptr (const transfer_ptr& p)
++ : p_ (const_cast<transfer_ptr&> (p).transfer ()) {}
++#else
+ #ifdef ODB_CXX11_NULLPTR
+ transfer_ptr (std::nullptr_t): p_ (0) {}
+ #endif
+--- a/odb/details/win32/exceptions.cxx
++++ b/odb/details/win32/exceptions.cxx
+@@ -9,7 +9,7 @@
+ namespace details
+ {
+ const char* win32_exception::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "Win32 API error";
+ }
+--- a/odb/details/win32/exceptions.hxx
++++ b/odb/details/win32/exceptions.hxx
+@@ -7,9 +7,10 @@
+
+ #include <odb/pre.hxx>
+
+-#include <odb/details/win32/windows.hxx>
++#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/export.hxx>
+ #include <odb/details/exception.hxx>
++#include <odb/details/win32/windows.hxx>
+
+ namespace odb
+ {
+@@ -24,7 +25,7 @@
+ code () const {return code_;}
+
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual win32_exception*
+ clone () const;
+--- a/odb/exception.hxx
++++ b/odb/exception.hxx
+@@ -11,6 +11,7 @@
+
+ #include <odb/forward.hxx> // odb::core
+
++#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/export.hxx>
+ #include <odb/details/shared-ptr/base.hxx>
+
+@@ -19,7 +20,7 @@
+ struct LIBODB_EXPORT exception: std::exception, details::shared_base
+ {
+ virtual const char*
+- what () const throw () = 0;
++ what () const ODB_NOTHROW_NOEXCEPT = 0;
+
+ virtual exception*
+ clone () const = 0;
+--- a/odb/exceptions.cxx
++++ b/odb/exceptions.cxx
+@@ -13,7 +13,7 @@
+ namespace odb
+ {
+ const char* null_pointer::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "NULL pointer";
+ }
+@@ -25,7 +25,7 @@
+ }
+
+ const char* already_in_transaction::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "transaction already in progress in this thread";
+ }
+@@ -37,7 +37,7 @@
+ }
+
+ const char* not_in_transaction::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "operation can only be performed in transaction";
+ }
+@@ -49,7 +49,7 @@
+ }
+
+ const char* transaction_already_finalized::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "transaction already committed or rolled back";
+ }
+@@ -61,7 +61,7 @@
+ }
+
+ const char* already_in_session::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "session already in effect in this thread";
+ }
+@@ -73,7 +73,7 @@
+ }
+
+ const char* not_in_session::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "session not in effect in this thread";
+ }
+@@ -85,7 +85,7 @@
+ }
+
+ const char* session_required::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "session required to load this object relationship";
+ }
+@@ -97,7 +97,7 @@
+ }
+
+ const char* deadlock::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "transaction aborted due to deadlock";
+ }
+@@ -109,7 +109,7 @@
+ }
+
+ const char* connection_lost::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "connection to database lost";
+ }
+@@ -121,7 +121,7 @@
+ }
+
+ const char* timeout::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "database operation timeout";
+ }
+@@ -133,7 +133,7 @@
+ }
+
+ const char* object_not_persistent::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "object not persistent";
+ }
+@@ -145,7 +145,7 @@
+ }
+
+ const char* object_already_persistent::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "object already persistent";
+ }
+@@ -157,7 +157,7 @@
+ }
+
+ const char* object_changed::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "object changed concurrently";
+ }
+@@ -169,7 +169,7 @@
+ }
+
+ const char* result_not_cached::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "query result is not cached";
+ }
+@@ -181,7 +181,7 @@
+ }
+
+ const char* abstract_class::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "database operation on instance of abstract class";
+ }
+@@ -193,7 +193,7 @@
+ }
+
+ const char* no_type_info::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "no type information";
+ }
+@@ -214,12 +214,12 @@
+ }
+
+ prepared_already_cached::
+- ~prepared_already_cached () throw ()
++ ~prepared_already_cached () ODB_NOTHROW_NOEXCEPT
+ {
+ }
+
+ const char* prepared_already_cached::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return what_.c_str ();
+ }
+@@ -240,12 +240,12 @@
+ }
+
+ prepared_type_mismatch::
+- ~prepared_type_mismatch () throw ()
++ ~prepared_type_mismatch () ODB_NOTHROW_NOEXCEPT
+ {
+ }
+
+ const char* prepared_type_mismatch::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return what_.c_str ();
+ }
+@@ -266,12 +266,12 @@
+ }
+
+ unknown_schema::
+- ~unknown_schema () throw ()
++ ~unknown_schema () ODB_NOTHROW_NOEXCEPT
+ {
+ }
+
+ const char* unknown_schema::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return what_.c_str ();
+ }
+@@ -293,12 +293,12 @@
+ }
+
+ unknown_schema_version::
+- ~unknown_schema_version () throw ()
++ ~unknown_schema_version () ODB_NOTHROW_NOEXCEPT
+ {
+ }
+
+ const char* unknown_schema_version::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return what_.c_str ();
+ }
+@@ -310,7 +310,7 @@
+ }
+
+ const char* section_not_loaded::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "section is not loaded";
+ }
+@@ -322,7 +322,7 @@
+ }
+
+ const char* section_not_in_object::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "section instance is not part of an object (section was copied?)";
+ }
+@@ -336,7 +336,7 @@
+ // multiple_exceptions
+ //
+ multiple_exceptions::
+- ~multiple_exceptions () throw () {}
++ ~multiple_exceptions () ODB_NOTHROW_NOEXCEPT {}
+
+ void multiple_exceptions::
+ insert (size_t p, bool maybe, const odb::exception& e, bool fatal)
+@@ -418,7 +418,7 @@
+ }
+
+ const char* multiple_exceptions::
+- what () const throw ()
++ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return what_.c_str ();
+ }
+--- a/odb/exceptions.hxx
++++ b/odb/exceptions.hxx
+@@ -15,6 +15,7 @@
+ #include <odb/forward.hxx> // schema_version, odb::core
+ #include <odb/exception.hxx>
+
++#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+ #include <odb/details/export.hxx>
+ #include <odb/details/shared-ptr.hxx>
+
+@@ -23,7 +24,7 @@
+ struct LIBODB_EXPORT null_pointer: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual null_pointer*
+ clone () const;
+@@ -34,7 +35,7 @@
+ struct LIBODB_EXPORT already_in_transaction: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual already_in_transaction*
+ clone () const;
+@@ -43,7 +44,7 @@
+ struct LIBODB_EXPORT not_in_transaction: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual not_in_transaction*
+ clone () const;
+@@ -52,7 +53,7 @@
+ struct LIBODB_EXPORT transaction_already_finalized: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual transaction_already_finalized*
+ clone () const;
+@@ -63,7 +64,7 @@
+ struct LIBODB_EXPORT already_in_session: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual already_in_session*
+ clone () const;
+@@ -72,7 +73,7 @@
+ struct LIBODB_EXPORT not_in_session: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual not_in_session*
+ clone () const;
+@@ -81,7 +82,7 @@
+ struct LIBODB_EXPORT session_required: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual session_required*
+ clone () const;
+@@ -97,7 +98,7 @@
+ struct LIBODB_EXPORT connection_lost: recoverable
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual connection_lost*
+ clone () const;
+@@ -106,7 +107,7 @@
+ struct LIBODB_EXPORT timeout: recoverable
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual timeout*
+ clone () const;
+@@ -115,7 +116,7 @@
+ struct LIBODB_EXPORT deadlock: recoverable
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual deadlock*
+ clone () const;
+@@ -124,7 +125,7 @@
+ struct LIBODB_EXPORT object_not_persistent: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual object_not_persistent*
+ clone () const;
+@@ -133,7 +134,7 @@
+ struct LIBODB_EXPORT object_already_persistent: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual object_already_persistent*
+ clone () const;
+@@ -142,7 +143,7 @@
+ struct LIBODB_EXPORT object_changed: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual object_changed*
+ clone () const;
+@@ -151,7 +152,7 @@
+ struct LIBODB_EXPORT result_not_cached: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual result_not_cached*
+ clone () const;
+@@ -167,7 +168,7 @@
+ struct LIBODB_EXPORT abstract_class: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual abstract_class*
+ clone () const;
+@@ -176,7 +177,7 @@
+ struct LIBODB_EXPORT no_type_info: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual no_type_info*
+ clone () const;
+@@ -187,7 +188,7 @@
+ struct LIBODB_EXPORT prepared_already_cached: odb::exception
+ {
+ prepared_already_cached (const char* name);
+- ~prepared_already_cached () throw ();
++ ~prepared_already_cached () ODB_NOTHROW_NOEXCEPT;
+
+ const char*
+ name () const
+@@ -196,7 +197,7 @@
+ }
+
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual prepared_already_cached*
+ clone () const;
+@@ -209,13 +210,13 @@
+ struct LIBODB_EXPORT prepared_type_mismatch: odb::exception
+ {
+ prepared_type_mismatch (const char* name);
+- ~prepared_type_mismatch () throw ();
++ ~prepared_type_mismatch () ODB_NOTHROW_NOEXCEPT;
+
+ const char*
+ name () const {return name_;}
+
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual prepared_type_mismatch*
+ clone () const;
+@@ -230,13 +231,13 @@
+ struct LIBODB_EXPORT unknown_schema: odb::exception
+ {
+ unknown_schema (const std::string& name);
+- ~unknown_schema () throw ();
++ ~unknown_schema () ODB_NOTHROW_NOEXCEPT;
+
+ const std::string&
+ name () const {return name_;}
+
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual unknown_schema*
+ clone () const;
+@@ -249,13 +250,13 @@
+ struct LIBODB_EXPORT unknown_schema_version: odb::exception
+ {
+ unknown_schema_version (schema_version);
+- ~unknown_schema_version () throw ();
++ ~unknown_schema_version () ODB_NOTHROW_NOEXCEPT;
+
+ schema_version
+ version () const {return version_;}
+
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual unknown_schema_version*
+ clone () const;
+@@ -270,7 +271,7 @@
+ struct LIBODB_EXPORT section_not_loaded: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual section_not_loaded*
+ clone () const;
+@@ -279,7 +280,7 @@
+ struct LIBODB_EXPORT section_not_in_object: odb::exception
+ {
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual section_not_in_object*
+ clone () const;
+@@ -399,7 +400,7 @@
+ //
+ public:
+ virtual const char*
+- what () const throw ();
++ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual multiple_exceptions*
+ clone () const;
+@@ -413,7 +414,7 @@
+ // Implementation details.
+ //
+ public:
+- ~multiple_exceptions () throw ();
++ ~multiple_exceptions () ODB_NOTHROW_NOEXCEPT;
+
+ // All instances of the common exception must be equal since we are
+ // going to create and share just one.
+--- a/odb/lazy-pointer-traits.hxx
++++ b/odb/lazy-pointer-traits.hxx
+@@ -38,6 +38,7 @@
+ }
+ };
+
++#ifndef ODB_CXX11
+ template <typename T>
+ class pointer_traits< lazy_auto_ptr<T> >
+ {
+@@ -62,6 +63,7 @@
+ return p.template object_id<O> ();
+ }
+ };
++#endif
+
+ #ifdef ODB_CXX11
+ template <typename T, typename D>
+--- a/odb/lazy-ptr.hxx
++++ b/odb/lazy-ptr.hxx
+@@ -116,6 +116,7 @@
+
+ // std::auto_ptr lazy version.
+ //
++#ifndef ODB_CXX11
+ template <class T>
+ struct lazy_auto_ptr_ref
+ {
+@@ -203,11 +204,7 @@
+ template <class DB> void reset (DB&, T*);
+ template <class DB, class Y> void reset (DB&, std::auto_ptr<Y>&);
+
+-#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT
+- template <class O = T>
+-#else
+ template <class O /* = T */>
+-#endif
+ typename object_traits<O>::id_type object_id () const;
+
+ database_type& database () const;
+@@ -223,6 +220,7 @@
+ mutable std::auto_ptr<T> p_;
+ mutable lazy_ptr_impl<T> i_;
+ };
++#endif
+
+ #ifdef ODB_CXX11
+
+@@ -251,7 +249,7 @@
+
+ lazy_unique_ptr (lazy_unique_ptr&&) /*noexcept*/;
+ template <class T1, class D1> lazy_unique_ptr (lazy_unique_ptr<T1, D1>&&)
/*noexcept*/;
+- template <class T1> lazy_unique_ptr (std::auto_ptr<T1>&&) /*noexcept*/;
++ //template <class T1> lazy_unique_ptr (std::auto_ptr<T1>&&) /*noexcept*/;
+
+ #ifdef ODB_CXX11_NULLPTR
+ lazy_unique_ptr& operator= (std::nullptr_t) /*noexcept*/;
+@@ -325,12 +323,12 @@
+ template <class DB> lazy_unique_ptr (DB&, pointer, const deleter_type&);
+ template <class DB> lazy_unique_ptr (DB&, pointer, deleter_type&&);
+ template <class DB, class T1, class D1> lazy_unique_ptr (DB&,
std::unique_ptr<T1, D1>&&);
+- template <class DB, class T1> lazy_unique_ptr (DB&, std::auto_ptr<T1>&&);
++ //template <class DB, class T1> lazy_unique_ptr (DB&,
std::auto_ptr<T1>&&);
+
+ template <class DB, class ID> void reset (DB&, const ID&);
+ template <class DB> void reset (DB&, pointer);
+ template <class DB, class T1, class D1> void reset (DB&,
std::unique_ptr<T1, D1>&&);
+- template <class DB, class T1> void reset (DB&, std::auto_ptr<T1>&&);
++ //template <class DB, class T1> void reset (DB&, std::auto_ptr<T1>&&);
+
+ #ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT
+ template <class O = T>
+@@ -413,7 +411,7 @@
+ lazy_shared_ptr (lazy_shared_ptr&&) /*noexcept*/;
+ template <class Y> lazy_shared_ptr (lazy_shared_ptr<Y>&&) /*noexcept*/;
+ template <class Y> explicit lazy_shared_ptr (const lazy_weak_ptr<Y>&);
+- template <class Y> explicit lazy_shared_ptr (std::auto_ptr<Y>&&);
++ //template <class Y> explicit lazy_shared_ptr (std::auto_ptr<Y>&&);
+ template <class Y, class D> lazy_shared_ptr (std::unique_ptr<Y, D>&&);
+
+ ~lazy_shared_ptr ();
+@@ -422,7 +420,7 @@
+ template <class Y> lazy_shared_ptr& operator= (const lazy_shared_ptr<Y>&)
/*noexcept*/;
+ lazy_shared_ptr& operator= (lazy_shared_ptr&&) /*noexcept*/;
+ template <class Y> lazy_shared_ptr& operator= (lazy_shared_ptr<Y>&&)
/*noexcept*/;
+- template <class Y> lazy_shared_ptr& operator= (std::auto_ptr<Y>&&);
++ //template <class Y> lazy_shared_ptr& operator= (std::auto_ptr<Y>&&);
+ template <class Y, class D> lazy_shared_ptr& operator=
(std::unique_ptr<Y, D>&&);
+
+ void swap (lazy_shared_ptr&) /*noexcept*/;
+@@ -488,7 +486,7 @@
+ template <class DB, class Y> lazy_shared_ptr (DB&, Y*);
+ template <class DB, class Y, class D> lazy_shared_ptr (DB&, Y*, D);
+ template <class DB, class Y, class D, class A> lazy_shared_ptr (DB&, Y*,
D, A);
+- template <class DB, class Y> lazy_shared_ptr (DB&, std::auto_ptr<Y>&&);
++ //template <class DB, class Y> lazy_shared_ptr (DB&, std::auto_ptr<Y>&&);
+ template <class DB, class Y> lazy_shared_ptr (DB&, const
std::shared_ptr<Y>&);
+ template <class DB, class Y> lazy_shared_ptr (DB&, std::shared_ptr<Y>&&);
+ template <class DB, class Y> lazy_shared_ptr (DB&, const
std::weak_ptr<Y>&);
+@@ -497,7 +495,7 @@
+ template <class DB, class Y> void reset (DB&, Y*);
+ template <class DB, class Y, class D> void reset (DB&, Y*, D);
+ template <class DB, class Y, class D, class A> void reset (DB&, Y*, D, A);
+- template <class DB, class Y> void reset (DB&, std::auto_ptr<Y>&&);
++ //template <class DB, class Y> void reset (DB&, std::auto_ptr<Y>&&);
+ template <class DB, class Y> void reset (DB&, const std::shared_ptr<Y>&);
+ template <class DB, class Y> void reset (DB&, std::shared_ptr<Y>&&);
+
+@@ -655,7 +653,10 @@
+ namespace common
+ {
+ using odb::lazy_ptr;
++
++#ifndef ODB_CXX11
+ using odb::lazy_auto_ptr;
++#endif
+
+ #ifdef ODB_CXX11
+ using odb::lazy_unique_ptr;
+--- a/odb/lazy-ptr.ixx
++++ b/odb/lazy-ptr.ixx
+@@ -223,6 +223,7 @@
+ //
+ // lazy_auto_ptr_ref
+ //
++#ifndef ODB_CXX11
+
+ template <class T>
+ inline lazy_auto_ptr_ref<T>::
+@@ -487,6 +488,7 @@
+ {
+ return *i_.database ();
+ }
++#endif
+
+ #ifdef ODB_CXX11
+
+@@ -527,10 +529,10 @@
+ lazy_unique_ptr (lazy_unique_ptr<T1, D1>&& r)
+ : p_ (std::move (r.p_)), i_ (std::move (r.i_)) {}
+
+- template <class T, class D>
+- template <class T1>
+- lazy_unique_ptr<T, D>::
+- lazy_unique_ptr (std::auto_ptr<T1>&& r): p_ (std::move (r)) {}
++ // template <class T, class D>
++ // template <class T1>
++ // lazy_unique_ptr<T, D>::
++ // lazy_unique_ptr (std::auto_ptr<T1>&& r): p_ (std::move (r)) {}
+
+ #ifdef ODB_CXX11_NULLPTR
+ template <class T, class D>
+@@ -732,15 +734,15 @@
+ i_.reset_db (db);
+ }
+
+- template <class T, class D>
+- template <class DB, class T1>
+- inline lazy_unique_ptr<T, D>::
+- lazy_unique_ptr (DB& db, std::auto_ptr<T1>&& p)
+- : p_ (std::move (p))
+- {
+- if (p_)
+- i_.reset_db (db);
+- }
++ // template <class T, class D>
++ // template <class DB, class T1>
++ // inline lazy_unique_ptr<T, D>::
++ // lazy_unique_ptr (DB& db, std::auto_ptr<T1>&& p)
++ // : p_ (std::move (p))
++ // {
++ // if (p_)
++ // i_.reset_db (db);
++ // }
+
+ template <class T, class D>
+ template <class DB, class ID>
+@@ -777,18 +779,18 @@
+ i_.reset ();
+ }
+
+- template <class T, class D>
+- template <class DB, class T1>
+- inline void lazy_unique_ptr<T, D>::
+- reset (DB& db, std::auto_ptr<T1>&& p)
+- {
+- p_ = std::unique_ptr<T, D> (std::move (p));
+-
+- if (p_)
+- i_.reset_db (db);
+- else
+- i_.reset ();
+- }
++ // template <class T, class D>
++ // template <class DB, class T1>
++ // inline void lazy_unique_ptr<T, D>::
++ // reset (DB& db, std::auto_ptr<T1>&& p)
++ // {
++ // p_ = std::unique_ptr<T, D> (std::move (p));
++ //
++ // if (p_)
++ // i_.reset_db (db);
++ // else
++ // i_.reset ();
++ // }
+
+ template <class T, class D>
+ template <class O>
+@@ -943,10 +945,10 @@
+ throw std::bad_weak_ptr ();
+ }
+
+- template <class T>
+- template <class Y>
+- inline lazy_shared_ptr<T>::
+- lazy_shared_ptr (std::auto_ptr<Y>&& r): p_ (std::move (r)) {}
++ // template <class T>
++ // template <class Y>
++ // inline lazy_shared_ptr<T>::
++ // lazy_shared_ptr (std::auto_ptr<Y>&& r): p_ (std::move (r)) {}
+
+ template <class T>
+ template <class Y, class D>
+@@ -995,15 +997,15 @@
+ return *this;
+ }
+
+- template <class T>
+- template <class Y>
+- inline lazy_shared_ptr<T>& lazy_shared_ptr<T>::
+- operator= (std::auto_ptr<Y>&& r)
+- {
+- p_ = std::move (r);
+- i_.reset ();
+- return *this;
+- }
++ // template <class T>
++ // template <class Y>
++ // inline lazy_shared_ptr<T>& lazy_shared_ptr<T>::
++ // operator= (std::auto_ptr<Y>&& r)
++ // {
++ // p_ = std::move (r);
++ // i_.reset ();
++ // return *this;
++ // }
+
+ template <class T>
+ template <class Y, class D>
+@@ -1212,15 +1214,15 @@
+ i_.reset_db (db);
+ }
+
+- template <class T>
+- template <class DB, class Y>
+- inline lazy_shared_ptr<T>::
+- lazy_shared_ptr (DB& db, std::auto_ptr<Y>&& r)
+- : p_ (std::move (r))
+- {
+- if (p_)
+- i_.reset_db (db);
+- }
++ // template <class T>
++ // template <class DB, class Y>
++ // inline lazy_shared_ptr<T>::
++ // lazy_shared_ptr (DB& db, std::auto_ptr<Y>&& r)
++ // : p_ (std::move (r))
++ // {
++ // if (p_)
++ // i_.reset_db (db);
++ // }
+
+ template <class T>
+ template <class DB, class Y>
+@@ -1300,18 +1302,18 @@
+ i_.reset ();
+ }
+
+- template <class T>
+- template <class DB, class Y>
+- inline void lazy_shared_ptr<T>::
+- reset (DB& db, std::auto_ptr<Y>&& r)
+- {
+- p_ = std::move (r);
+-
+- if (p_)
+- i_.reset_db (db);
+- else
+- i_.reset ();
+- }
++ // template <class T>
++ // template <class DB, class Y>
++ // inline void lazy_shared_ptr<T>::
++ // reset (DB& db, std::auto_ptr<Y>&& r)
++ // {
++ // p_ = std::move (r);
++ //
++ // if (p_)
++ // i_.reset_db (db);
++ // else
++ // i_.reset ();
++ // }
+
+ template <class T>
+ template <class DB, class Y>
+--- a/odb/pointer-traits.hxx
++++ b/odb/pointer-traits.hxx
+@@ -161,6 +161,7 @@
+
+ // Specialization for std::auto_ptr.
+ //
++#ifndef ODB_CXX11
+ template <typename T>
+ class pointer_traits< std::auto_ptr<T> >
+ {
+@@ -230,6 +231,7 @@
+ operator delete (p);
+ }
+ };
++#endif
+
+ #ifdef ODB_CXX11
+
+--- a/odb/wrapper-traits.hxx
++++ b/odb/wrapper-traits.hxx
+@@ -77,6 +77,7 @@
+
+ // Specialization for std::auto_ptr.
+ //
++#ifndef ODB_CXX11
+ template <typename T>
+ class wrapper_traits< std::auto_ptr<T> >
+ {
+@@ -122,6 +123,7 @@
+ return const_cast<unrestricted_wrapped_type&> (*p);
+ }
+ };
++#endif
+
+ #ifdef ODB_CXX11
+
diff -Nru libodb-2.4.0/debian/patches/series libodb-2.4.0/debian/patches/series
--- libodb-2.4.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ libodb-2.4.0/debian/patches/series 2023-09-25 12:25:15.000000000 +0200
@@ -0,0 +1 @@
+fix-gcc-11-build-issue.patch