Skip to content

Commit c1e807f

Browse files
committed
Merge branch 'develop'
2 parents 4575239 + 95a541b commit c1e807f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1281
-1271
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include(cmake/Utils.cmake)
77
#
88
project(
99
stdsharp
10-
VERSION 0.6.1
10+
VERSION 0.6.2
1111
LANGUAGES CXX)
1212

1313
config_lib(${PROJECT_NAME} INTERFACE STD 23)

include/stdsharp/algorithm/algorithm.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@
1010

1111
namespace stdsharp
1212
{
13-
inline constexpr auto set_if = []<typename T, typename U, ::std::predicate<U, T> Comp>
14-
requires ::std::assignable_from<T&, U> // clang-format off
13+
inline constexpr auto set_if = []<typename T, typename U, std::predicate<U, T> Comp>
14+
requires std::assignable_from<T&, U> // clang-format off
1515
(T& left, U&& right, Comp comp = {})
1616
noexcept(nothrow_predicate<Comp, U, T> && nothrow_assignable_from<T&, U>)
1717
-> T& // clang-format on
1818
{
19-
if(::std::invoke(cpp_move(comp), right, left)) left = cpp_forward(right);
19+
if(std::invoke(cpp_move(comp), right, left)) left = cpp_forward(right);
2020
return left;
2121
};
2222

2323
using set_if_fn = decltype(set_if);
2424

2525
inline constexpr auto set_if_greater = []<typename T, typename U>
26-
requires ::std::invocable<set_if_fn, T&, U, ::std::ranges::greater> // clang-format off
26+
requires std::invocable<set_if_fn, T&, U, std::ranges::greater> // clang-format off
2727
(T & left, U && right)
28-
noexcept(nothrow_invocable<set_if_fn, T&, U, ::std::ranges::greater>) -> T& // clang-format on
28+
noexcept(nothrow_invocable<set_if_fn, T&, U, std::ranges::greater>) -> T& // clang-format on
2929
{
3030
return set_if(left, cpp_forward(right), greater_v);
3131
};
3232

3333
using set_if_greater_fn = decltype(set_if_greater);
3434

3535
inline constexpr auto set_if_less = []<typename T, typename U>
36-
requires ::std::invocable<set_if_fn, T&, U, ::std::ranges::less> // clang-format off
36+
requires std::invocable<set_if_fn, T&, U, std::ranges::less> // clang-format off
3737
(T& left, U&& right)
38-
noexcept(nothrow_invocable<set_if_fn, T&, U, ::std::ranges::less>) -> T& // clang-format on
38+
noexcept(nothrow_invocable<set_if_fn, T&, U, std::ranges::less>) -> T& // clang-format on
3939
{
4040
return set_if(left, cpp_forward(right), less_v);
4141
};
@@ -46,9 +46,9 @@ namespace stdsharp
4646
{
4747
template<
4848
typename T,
49-
typename Proj = ::std::identity,
50-
::std::indirect_strict_weak_order<::std::projected<const T*, Proj>> Compare =
51-
::std::ranges::less // clang-format off
49+
typename Proj = std::identity,
50+
std::indirect_strict_weak_order<std::projected<const T*, Proj>> Compare =
51+
std::ranges::less // clang-format off
5252
> // clang-format on
5353
[[nodiscard]] constexpr auto operator()( // NOLINTBEGIN(*-easily-swappable-parameters)
5454
const T& t,
@@ -61,33 +61,33 @@ namespace stdsharp
6161
!is_debug ||
6262
nothrow_predicate<
6363
Compare,
64-
::std::projected<const T*, Proj>,
65-
::std::projected<const T*, Proj> // clang-format off
64+
std::projected<const T*, Proj>,
65+
std::projected<const T*, Proj> // clang-format off
6666
> // clang-format on
6767
)
6868
{
69-
const auto& proj_max = ::std::invoke(proj, max);
70-
const auto& proj_min = ::std::invoke(proj, min);
71-
const auto& proj_t = ::std::invoke(proj, t);
69+
const auto& proj_max = std::invoke(proj, max);
70+
const auto& proj_min = std::invoke(proj, min);
71+
const auto& proj_t = std::invoke(proj, t);
7272

73-
precondition<::std::invalid_argument>(
74-
[&] { return !::std::invoke(cmp, proj_max, proj_min); },
73+
precondition<std::invalid_argument>(
74+
[&] { return !std::invoke(cmp, proj_max, proj_min); },
7575
"max value should not less than min value"
7676
);
7777

78-
return !::std::invoke(cmp, proj_t, proj_min) && !::std::invoke(cmp, proj_max, proj_t);
78+
return !std::invoke(cmp, proj_t, proj_min) && !std::invoke(cmp, proj_max, proj_t);
7979
}
8080
} is_between{};
8181

8282
constexpr struct strict_compare_fn
8383
{
84-
template<::std::ranges::input_range TRng, ::std::ranges::input_range URng>
85-
requires ::std::three_way_comparable_with<
84+
template<std::ranges::input_range TRng, std::ranges::input_range URng>
85+
requires std::three_way_comparable_with<
8686
range_const_reference_t<TRng>,
8787
range_const_reference_t<URng>>
8888
constexpr auto operator()(const TRng& left, const URng& right) const
8989
{
90-
using ordering = ::std::partial_ordering;
90+
using ordering = std::partial_ordering;
9191

9292
auto pre = ordering::equivalent;
9393
const auto cmp_impl = [](ordering& pre, const ordering next)
@@ -106,10 +106,10 @@ namespace stdsharp
106106
};
107107

108108
{
109-
auto l_it = ::std::ranges::cbegin(left);
110-
auto r_it = ::std::ranges::cbegin(right);
111-
const auto l_end = ::std::ranges::cend(left);
112-
const auto r_end = ::std::ranges::cend(right);
109+
auto l_it = std::ranges::cbegin(left);
110+
auto r_it = std::ranges::cbegin(right);
111+
const auto l_end = std::ranges::cend(left);
112+
const auto r_end = std::ranges::cend(right);
113113
for(; !is_ud(pre); ++l_it, ++r_it)
114114
{
115115
if(l_it == l_end)
@@ -124,7 +124,7 @@ namespace stdsharp
124124
break;
125125
}
126126

127-
cmp_impl(pre, ::std::compare_three_way{}(*l_it, *r_it));
127+
cmp_impl(pre, std::compare_three_way{}(*l_it, *r_it));
128128
}
129129
}
130130

include/stdsharp/array/array.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88

99
namespace stdsharp
1010
{
11-
template<::std::size_t N>
11+
template<std::size_t N>
1212
struct range_to_array_fn
1313
{
14-
template<typename Rng, typename Proj = ::std::identity>
14+
template<typename Rng, typename Proj = std::identity>
1515
constexpr auto operator()(Rng&& rng, Proj proj = {}) const
1616
{
17-
using value_type = ::std::projected<::std::ranges::iterator_t<Rng>, Proj>::value_type;
17+
using value_type = std::projected<std::ranges::iterator_t<Rng>, Proj>::value_type;
1818

19-
::std::array<value_type, N> arr{};
19+
std::array<value_type, N> arr{};
2020

21-
::std::ranges::copy(
21+
std::ranges::copy(
2222
cpp_forward(rng) | //
23-
::std::views::transform(proj) | //
24-
::std::views::take(N),
23+
std::views::transform(proj) | //
24+
std::views::take(N),
2525
arr.begin()
2626
);
2727

2828
return arr;
2929
}
3030
};
3131

32-
template<::std::size_t N>
32+
template<std::size_t N>
3333
inline constexpr range_to_array_fn<N> range_to_array{};
3434
}

include/stdsharp/cassert/cassert.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ namespace stdsharp
1616
;
1717

1818
template<typename Exception, typename Predicate, typename... Args>
19-
requires ::std::constructible_from<Exception, Args...> &&
20-
::std::predicate<const Predicate&> && is_debug
19+
requires std::constructible_from<Exception, Args...> && std::predicate<const Predicate&> &&
20+
is_debug
2121
constexpr void precondition(const Predicate& predicate, Args&&... args)
2222
{
23-
::std::invoke(predicate) ? void() : throw Exception{static_cast<Args&&>(args)...}; // NOLINT
23+
std::invoke(predicate) ? void() : throw Exception{static_cast<Args&&>(args)...}; // NOLINT
2424
}
2525

2626
template<typename, typename Predicate>
27-
requires ::std::predicate<const Predicate&>
27+
requires std::predicate<const Predicate&>
2828
constexpr void precondition([[maybe_unused]] const Predicate& predicate, auto&&...) noexcept
2929
{
30-
STDSHARP_ASSUME(::std::invoke(predicate));
30+
STDSHARP_ASSUME(std::invoke(predicate));
3131
}
3232
}
3333

include/stdsharp/cmath/cmath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace stdsharp
77
{
8-
constexpr auto ceil_reminder(const ::std::integral auto x, decltype(x) y) noexcept
8+
constexpr auto ceil_reminder(const std::integral auto x, decltype(x) y) noexcept
99
{
1010
return (x + y - 1) / y;
1111
}

include/stdsharp/compare/compare.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace stdsharp
66
{
7-
constexpr bool is_ud(const ::std::partial_ordering c) noexcept
7+
constexpr bool is_ud(const std::partial_ordering c) noexcept
88
{
9-
return c == ::std::partial_ordering::unordered;
9+
return c == std::partial_ordering::unordered;
1010
}
1111
}

0 commit comments

Comments
 (0)