Skip to content

Commit 83839ac

Browse files
committed
fix(*all*): correct headers
1 parent 7c8239a commit 83839ac

File tree

8 files changed

+20
-21
lines changed

8 files changed

+20
-21
lines changed

include/stdsharp/array/array.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
#include <algorithm>
55
#include <ranges>
66

7+
#include "../macros.h"
8+
79
namespace stdsharp
810
{
911
template<::std::size_t N>
1012
struct range_to_array_fn
1113
{
1214
template<typename Rng, typename Proj = ::std::identity>
13-
constexpr auto operator()(Rng&& rng, Proj&& proj = {}) const
15+
constexpr auto operator()(Rng&& rng, Proj proj = {}) const
1416
{
15-
::std::array<::std::projected<::std::ranges::iterator_t<Rng>, Proj>, N> arr{};
17+
using value_type = ::std::projected<::std::ranges::iterator_t<Rng>, Proj>::value_type;
18+
19+
::std::array<value_type, N> arr{};
1620

1721
::std::ranges::copy(
1822
cpp_forward(rng) | //
19-
::std::views::transform(cpp_forward(proj)) | //
23+
::std::views::transform(proj) | //
2024
::std::views::take(N),
2125
arr.begin()
2226
);

include/stdsharp/concepts/concepts.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
//
44
#pragma once
55

6+
#include <compare>
67
#include <concepts>
78
#include <type_traits>
8-
#include <utility>
99

1010
#include "../macros.h"
1111

@@ -288,14 +288,13 @@ namespace stdsharp
288288
template<typename T>
289289
concept nothrow_move_assignable = ::std::is_nothrow_move_assignable_v<T>;
290290

291-
template<typename T>
292-
concept nothrow_swappable =
293-
requires(T& t1, T& t2) { requires noexcept(::std::ranges::swap(t1, t2)); };
294-
295291
template<typename T, typename U>
296292
concept nothrow_swappable_with =
297293
requires(T& t, U& u) { requires noexcept(::std::ranges::swap(t, u)); };
298294

295+
template<typename T>
296+
concept nothrow_swappable = nothrow_swappable_with<T, T>;
297+
299298
template<typename T>
300299
concept nothrow_movable = ::std::movable<T> && //
301300
nothrow_move_constructible<T> &&
@@ -320,11 +319,11 @@ namespace stdsharp
320319
concept nothrow_convertible_to = ::std::is_nothrow_convertible_v<T, U>;
321320

322321
template<typename From, typename To>
323-
concept explicitly_convertible = requires { static_cast<To>(std::declval<From>()); };
322+
concept explicitly_convertible = requires(From&& v) { static_cast<To>(cpp_forward(v)); };
324323

325324
template<typename From, typename To>
326325
concept nothrow_explicitly_convertible =
327-
requires { requires noexcept(static_cast<To>(std::declval<From>())); };
326+
requires(From&& v) { requires noexcept(static_cast<To>(cpp_forward(v))); };
328327

329328
template<typename To, typename From>
330329
concept explicitly_convertible_from = explicitly_convertible<From, To>;

include/stdsharp/memory/memory.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#pragma once
22

3-
#include "pointer_traits.h"
4-
#include "single_static_buffer.h"
5-
#include "static_allocator.h"
6-
#include "raii_memory.h"
3+
#include "small_object_optimization.h"
4+
#include "allocator_reference.h"
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#pragma once
22

33
#include "member.h"
4-
#include "object.h"
4+
#include "object.h"
5+
#include "type_sequence.h"

include/stdsharp/utility/adl_proof.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <concepts>
4-
53
namespace stdsharp
64
{
75
namespace details

include/stdsharp/utility/invocable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "../utility/value_wrapper.h"
3+
#include "value_wrapper.h"
44

55
namespace stdsharp
66
{

include/stdsharp/utility/utility.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11

22
#pragma once
33

4-
#include <utility>
5-
64
#include "auto_cast.h"
75
#include "cast_to.h"
86
#include "constructor.h"
97
#include "invocable.h"
108
#include "../type_traits/core_traits.h"
11-
#include "value_wrapper.h"
129

1310
namespace stdsharp
1411
{

include/stdsharp/utility/value_wrapper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include <utility>
4+
35
#include "../concepts/concepts.h"
46
#include "../compilation_config_in.h"
57

0 commit comments

Comments
 (0)