Skip to content

Commit f81b690

Browse files
committed
Fix C++98 build
1 parent e076794 commit f81b690

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/api/Compressor.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ limitations under the License.
3333
#include <stdio.h>
3434

3535
#ifdef __cplusplus
36-
#define KANZI_NOEXCEPT noexcept
36+
#if __cplusplus >= 201103L
37+
// C++ 11 or higher
38+
#define KANZI_NOEXCEPT noexcept
39+
#else
40+
#define KANZI_NOEXCEPT
41+
#endif
3742
#else
3843
#define KANZI_NOEXCEPT
3944
#endif

src/api/Decompressor.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ limitations under the License.
3333
#include <stdio.h>
3434

3535
#ifdef __cplusplus
36-
#define KANZI_NOEXCEPT noexcept
36+
#if __cplusplus >= 201103L
37+
// C++ 11 or higher
38+
#define KANZI_NOEXCEPT noexcept
39+
#else
40+
#define KANZI_NOEXCEPT
41+
#endif
3742
#else
3843
#define KANZI_NOEXCEPT
3944
#endif

0 commit comments

Comments
 (0)