Skip to content

Commit 038b214

Browse files
authored
Fixed bug with ordering of #if's
1 parent 5827159 commit 038b214

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tinyutf8.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@
4343
#endif
4444

4545
//! Determine the mode of error handling
46-
#if defined(__cpp_exceptions) && !defined(TINY_UTF8_NOEXCEPT) && !defined(TINY_UTF8_THROW)
47-
#include <stdexcept> // for std::out_of_range
48-
#define TINY_UTF8_THROW( LOCATION , FAILING_PREDICATE ) throw std::out_of_range( LOCATION ": " #FAILING_PREDICATE )
49-
#else
50-
#define TINY_UTF8_THROW( ... ) void()
46+
#ifndef TINY_UTF8_THROW
47+
#if defined(__cpp_exceptions) && !defined(TINY_UTF8_NOEXCEPT)
48+
#include <stdexcept> // for std::out_of_range
49+
#define TINY_UTF8_THROW( LOCATION , FAILING_PREDICATE ) throw std::out_of_range( LOCATION ": " #FAILING_PREDICATE )
50+
#else
51+
#define TINY_UTF8_THROW( ... ) void()
52+
#endif
5153
#endif
5254

5355
//! Remove -Wmaybe-uninitialized, since it is wrong for all cases in this file

0 commit comments

Comments
 (0)