mirror of
https://github.com/nemtrif/utfcpp.git
synced 2026-01-18 17:11:21 +01:00
Fix the name clash with assert macro
This commit is contained in:
@@ -48,9 +48,9 @@ DEALINGS IN THE SOFTWARE.
|
||||
#define UTF_CPP_OVERRIDE
|
||||
#define UTF_CPP_NOEXCEPT throw()
|
||||
// Simulate static_assert:
|
||||
template <bool Condition> struct StaticAssert {static void assert() {int static_assert_impl[(Condition ? 1 : -1)];} };
|
||||
template <> struct StaticAssert<true> {static void assert() {}};
|
||||
#define UTF_CPP_STATIC_ASSERT(condition) StaticAssert<condition>::assert();
|
||||
template <bool Condition> struct StaticAssert {static void utf8_static_assert() {int static_assert_impl[(Condition ? 1 : -1)];} };
|
||||
template <> struct StaticAssert<true> {static void utf8_static_assert() {}};
|
||||
#define UTF_CPP_STATIC_ASSERT(condition) StaticAssert<condition>::utf8_static_assert();
|
||||
#endif // C++ 11 or later
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "ftest.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "test_checked_api.h"
|
||||
#include "test_checked_iterator.h"
|
||||
#include "test_unchecked_api.h"
|
||||
|
||||
Reference in New Issue
Block a user