[odb-users] C++17 and Exception Specifications
Brian Coggins
becoggins at hotmail.com
Tue Mar 27 09:10:49 EDT 2018
Hello,
I am using ODB 2.4.0 in a project which I would like to switch to C++17. However, the ODB headers use exception specifications, and these are not allowed under C++17. See the following error from clang:
> In file included from /Users/brian/Software/libodb-2.4.0/odb/database.hxx:27:
> In file included from /Users/brian/Software/libodb-2.4.0/odb/prepared-query.hxx:12:
> In file included from /Users/brian/Software/libodb-2.4.0/odb/result.hxx:16:
> In file included from /Users/brian/Software/libodb-2.4.0/odb/details/shared-ptr.hxx:11:
> /Users/brian/Software/libodb-2.4.0/odb/details/shared-ptr/base.hxx:38:49: error: ISO C++1z does not allow dynamic exception specifications [-Wdynamic-exception-spec]
> operator new (std::size_t, odb::details::share) throw (std::bad_alloc);
> ^~~~~~~~~~~~~~~~~~~~~~
> /Users/brian/Software/libodb-2.4.0/odb/details/shared-ptr/base.hxx:38:49: note: use 'noexcept(false)' instead
> operator new (std::size_t, odb::details::share) throw (std::bad_alloc);
> ^~~~~~~~~~~~~~~~~~~~~~
> noexcept(false)
I was wondering if there is any plan to update the ODB headers to allow compilation in C++17?
Thanks,
Brian
More information about the odb-users
mailing list