| 4 | #include "exception.h" |
| 5 | |
| 6 | OIDN_NAMESPACE_BEGIN |
| 7 | |
| 8 | // We *must* define this function here because Exception must have a key function, which is the |
| 9 | // first non-pure out-of-line virtual function of a type. Otherwise, the type_info would be |
| 10 | // emitted as a weak symbol and its address may be different in dynamically loaded modules, |
| 11 | // which would cause exception handling and dynamic_cast to fail. |
| 12 | const char* Exception::what() const noexcept |
| 13 | { |
| 14 | return message->c_str(); |
| 15 | } |
| 16 | |
| 17 | OIDN_NAMESPACE_END |