Skip to content

Commit f4436e3

Browse files
authored
Merge pull request #56 from TedLyngmo/missing_header_cstdlib
Add missing header: cstdlib
2 parents 22bba31 + 12d6b40 commit f4436e3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ TODO: tested platforms.
7474
7575
```text
7676
# Configure build
77-
$ cmake -S . -B build -DCMAKE_CXX_STANDARD=20
77+
$ cmake -S . -B build -DCMAKE_CXX_STANDARD=23
7878
-- The CXX compiler identification is GNU 11.4.0
7979
-- Detecting CXX compiler ABI info
8080
-- Detecting CXX compiler ABI info - done

include/beman/inplace_vector/inplace_vector.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,14 @@ Software.
257257
#include <concepts> // for lots...
258258
#include <cstddef> // for size_t
259259
#include <cstdint> // for fixed-width integer types
260+
#include <cstdio> // for assertion diagnostics
261+
#include <cstdlib> // for abort
260262
#include <functional> // for less and equal_to
261263
#include <iterator> // for reverse_iterator and iterator traits
262264
#include <limits> // for numeric_limits
263265
#include <new> // for operator new
264266
#include <ranges>
265267
#include <stdexcept> // for length_error
266-
#include <stdio.h> // for assertion diagnostics
267268
#include <type_traits> // for aligned_storage and all meta-functions
268269

269270
// Optimizer allowed to assume that EXPR evaluates to true
@@ -315,8 +316,8 @@ static constexpr void __assert_failure(char const *__file, int __line,
315316
if consteval {
316317
throw __msg; // TODO: std lib implementer, do better here
317318
} else {
318-
fprintf(stderr, "%s(%d): %s\n", __file, __line, __msg);
319-
abort();
319+
std::fprintf(stderr, "%s(%d): %s\n", __file, __line, __msg);
320+
std::abort();
320321
}
321322
}
322323

0 commit comments

Comments
 (0)