[odb-users] Compilation errors

Tiago Macarios tiagomacarios at gmail.com
Fri Sep 30 14:39:00 EDT 2016


Hi Boris, hope all is well.

I am getting a compilation error on Windows, was wondering if you saw this
before.

odb\details\shared-ptr\base.cxx(57): error C2220: warning treated as error
- no 'object' file generated
odb\details\shared-ptr\base.cxx(57): warning C4290: C++ exception
specification ignored except to indicate a function is not
__declspec(nothrow)

Here is the offending piece of code:

void* operator new (size_t n, odb::details::share s) throw (std::bad_alloc)



>From my naive googling around (please correct me if I am wrong), but looks
like microsoft does not support that construct since it is not enforceable:
https://msdn.microsoft.com/en-us/library/sa28fef8.aspx

And the c++ standard deprecated that syntax in favor of noexcept:
http://en.cppreference.com/w/cpp/language/function


Thanks,

Tiago


More information about the odb-users mailing list