diff options
Diffstat (limited to 'include/noexcept.h')
-rw-r--r-- | include/noexcept.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/noexcept.h b/include/noexcept.h new file mode 100644 index 0000000..25dc1a4 --- /dev/null +++ b/include/noexcept.h @@ -0,0 +1,21 @@ +/** + * NoExcept.h + * + * Some compilers (hello microsoft!) do not yet support the "noexcept" + * keyword. To overcome this, we use a macro that expands to "noexcept" + * + * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> + * @author atvive <https://github.com/atvise> + */ + +/** + * Macro to be able to support MSVC compiler + */ +#ifndef _NOEXCEPT +# ifndef _MSC_VER +# define _NOEXCEPT noexcept +# else +# define _NOEXCEPT __declspec(nothrow) +# endif +#endif + |