Re:When noexcept?
by blub on Thursday December 15, 2016 @03:47PM
(#13188236)
Exceptions or STL classes shouldn't cross library boundaries though, otherwise things will break.
[ Parent
| on HN ]
It will work perfectly fine as long as the libraries use compatible ABIs.
Make sure that your compiler provides a stable std library ABI.
Good point that it's technically doable.
Is this done a lot in practice? I had the impression that a lot of projects stick to C APIs in dynamic libraries.
MSVC does not guarantee a stable standard library ABI, so those that need to target it are out of luck. In linux land, the switch from libstdc++5 to 6 still haunt the memories of many, although it was quite a long time ago (gcc 3.4) and the ABI has been stable since.
In practice the reason that many projects provide a C ABI is that they want to interoperate with other languages and the C ABI, being extremely minimalist, is the least common denominator.
Re:When noexcept?
by user5994461 on Thursday December 15, 2016 @05:22PM
(#13189130)
And that's why exceptions have no real world usage in C++, except for a few local functions here and there.