Skip to content

Commit

Permalink
[hive] [flat_set] Regularize how C++20 headers are conditionally incl…
Browse files Browse the repository at this point in the history
…uded
  • Loading branch information
Quuxplusone committed Oct 19, 2023
1 parent ab0debd commit 260a3db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
4 changes: 4 additions & 0 deletions include/sg14/flat_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
#include <iterator>
#include <vector>

#if __cplusplus >= 202002L
#include <compare>
#endif // __cplusplus >= 202002L

namespace sg14 {

namespace flatset_detail {
Expand Down
19 changes: 7 additions & 12 deletions include/sg14/hive.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,23 @@

#include <stddef.h>
#include <algorithm>
#if __has_include(<bit>)
#include <bit>
#endif
#include <cassert>
#if __has_include(<compare>)
#include <compare>
#endif
#if __has_include(<concepts>)
#include <concepts>
#endif
#include <cstring>
#include <functional>
#include <initializer_list>
#include <iterator>
#include <limits>
#include <memory>
#if __has_include(<ranges>)
#include <ranges>
#endif
#include <type_traits>
#include <utility>

#if __cplusplus >= 202002L
#include <bit>
#include <compare>
#include <concepts>
#include <ranges>
#endif // __cplusplus >= 202002L

#ifndef SG14_HIVE_THROW
#include <stdexcept>
#define SG14_HIVE_THROW(x) throw (x)
Expand Down

0 comments on commit 260a3db

Please sign in to comment.