Well i wrote a little workaround.
#if __cplusplus >= 201703L
/* MySQL override. This needed to be inclided before cppconn/exception.h to define them */
#include <stdexcept>
#include <string>
#include <memory>
/* Now remove the trow */
#define throw(...)
#include <cppconn/exception.h>
#undef throw /* reset */
#endif
Short explanation:
If we're using c++17, throw is not allowed anymore on allocators.
If you take a closer look at the header of the library you'll see that there is a macro defined, which contains the definitions for the default allocator within the library. Sadly it can't be overridden because it gets defined there ignoring that's may already be defined. So somehow you have to override the trow anyway.
A basic trick is to override the trow function with a macro.
Doing that leads us to the problem that we also override the trow operator for all includes within the library which isn't a good solution (and also doesn't work).
As you may know, if you're includeing a header, it will be just included once (mostly, thanks to the header guards).
So the trick there is to include the headers, which are included by the library, than override the throw include the header of the target library, which doesn't actually include their header again because we already did.