Skip to content

Commit 25eb57b

Browse files
committed
Update noexceptions macro
1 parent 0b91e2d commit 25eb57b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/beman/inplace_vector/inplace_vector.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
#ifndef BEMAN_INPLACE_VECTOR_INPLACE_VECTOR_HPP
44
#define BEMAN_INPLACE_VECTOR_INPLACE_VECTOR_HPP
5+
6+
#if !defined(__has_include) || __has_include(<beman/inplace_vector/config.hpp>)
57
#include <beman/inplace_vector/config.hpp>
8+
#endif
69

710
#include <algorithm> // for rotate...
811
#include <array>
@@ -23,8 +26,7 @@
2326
#define IV_EXPECT(EXPR)
2427

2528
#ifndef BEMAN_IV_THROW_OR_ABORT
26-
#if !defined(__cpp_exceptions) || __cpp_exceptions < 199711L || \
27-
BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS()
29+
#if BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS()
2830
#include <cstdlib> // for abort
2931
#define BEMAN_IV_THROW_OR_ABORT(x) abort()
3032
#else

tests/beman/inplace_vector/noexceptions.test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include <array>
22

3+
#include <cstdlib>
4+
#define BEMAN_IV_THROW_OR_ABORT(x) abort()
5+
36
#include "gtest_setup.hpp"
47

58
namespace {

0 commit comments

Comments
 (0)