Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.37.1
rev: 0.38.0
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand All @@ -22,7 +22,7 @@ repos:
- id: trailing-whitespace # trims trailing whitespace.

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v22.1.2'
rev: 'v23.1.1'
hooks:
- id: clang-format
args: ["-style=file", "-i"]
Expand Down
4 changes: 2 additions & 2 deletions src/rpp/rpp/disposables/disposable_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace rpp::details
static_assert(std::derived_from<TDisposable, interface_disposable>);

template<typename... TArgs>
requires (std::constructible_from<TDisposable, TArgs && ...> && !rpp::constraint::variadic_decayed_same_as<auto_dispose_wrapper, TArgs...>)
requires (std::constructible_from<TDisposable, TArgs&&...> && !rpp::constraint::variadic_decayed_same_as<auto_dispose_wrapper, TArgs...>)
explicit auto_dispose_wrapper(TArgs&&... args)
: m_data{std::forward<TArgs>(args)...}
{
Expand Down Expand Up @@ -160,7 +160,7 @@ namespace rpp
* \endcode
*/
template<std::derived_from<TDisposable> TTarget = TDefaultMake, typename... TArgs>
requires (std::constructible_from<TTarget, TArgs && ...>)
requires (std::constructible_from<TTarget, TArgs&&...>)
[[nodiscard]] static disposable_wrapper_impl make(TArgs&&... args)
{
const auto ptr = std::make_shared<details::auto_dispose_wrapper<TTarget>>(std::forward<TArgs>(args)...);
Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/observables/observable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace rpp
using optimal_disposables_strategy = typename Strategy::optimal_disposables_strategy;

template<typename... Args>
requires (!constraint::variadic_decayed_same_as<observable<Type, Strategy>, Args...> && constraint::is_constructible_from<Strategy, Args && ...>)
requires (!constraint::variadic_decayed_same_as<observable<Type, Strategy>, Args...> && constraint::is_constructible_from<Strategy, Args&&...>)
observable(Args&&... args)
: m_strategy{std::forward<Args>(args)...}
{
Expand Down
4 changes: 2 additions & 2 deletions src/rpp/rpp/observers/observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ namespace rpp
}

template<typename... Args>
requires (constraint::is_constructible_from<Strategy, Args && ...> && !rpp::constraint::variadic_decayed_same_as<observer, Args...>)
requires (constraint::is_constructible_from<Strategy, Args&&...> && !rpp::constraint::variadic_decayed_same_as<observer, Args...>)
explicit observer(Args&&... args)
: Base{DisposableStrategy{}, std::forward<Args>(args)...}
{
Expand Down Expand Up @@ -214,7 +214,7 @@ namespace rpp
}

template<typename... Args>
requires (constraint::is_constructible_from<Strategy, Args && ...> && !rpp::constraint::variadic_decayed_same_as<observer, Args...>)
requires (constraint::is_constructible_from<Strategy, Args&&...> && !rpp::constraint::variadic_decayed_same_as<observer, Args...>)
explicit observer(Args&&... args)
: Base{DisposableStrategy{}, std::forward<Args>(args)...}
{
Expand Down
4 changes: 2 additions & 2 deletions src/rpp/rpp/operators/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace rpp::operators
auto publish();

template<typename Seed, typename Accumulator>
requires (!utils::is_not_template_callable<Accumulator> || std::same_as<std::decay_t<Seed>, std::invoke_result_t<Accumulator, std::decay_t<Seed> &&, rpp::utils::convertible_to_any>>)
requires (!utils::is_not_template_callable<Accumulator> || std::same_as<std::decay_t<Seed>, std::invoke_result_t<Accumulator, std::decay_t<Seed>&&, rpp::utils::convertible_to_any>>)
auto reduce(Seed&& seed, Accumulator&& accumulator);

template<typename Accumulator>
Expand All @@ -107,7 +107,7 @@ namespace rpp::operators
auto retry();

template<typename InitialValue, typename Fn>
requires (!utils::is_not_template_callable<Fn> || std::same_as<std::decay_t<InitialValue>, std::invoke_result_t<Fn, std::decay_t<InitialValue> &&, rpp::utils::convertible_to_any>>)
requires (!utils::is_not_template_callable<Fn> || std::same_as<std::decay_t<InitialValue>, std::invoke_result_t<Fn, std::decay_t<InitialValue>&&, rpp::utils::convertible_to_any>>)
auto scan(InitialValue&& initial_value, Fn&& accumulator);

template<typename Fn>
Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/operators/reduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace rpp::operators
* @see https://reactivex.io/documentation/operators/reduce.html
*/
template<typename Seed, typename Accumulator>
requires (!utils::is_not_template_callable<Accumulator> || std::same_as<std::decay_t<Seed>, std::invoke_result_t<Accumulator, std::decay_t<Seed> &&, rpp::utils::convertible_to_any>>)
requires (!utils::is_not_template_callable<Accumulator> || std::same_as<std::decay_t<Seed>, std::invoke_result_t<Accumulator, std::decay_t<Seed>&&, rpp::utils::convertible_to_any>>)
auto reduce(Seed&& seed, Accumulator&& accumulator)
{
return details::reduce_t<std::decay_t<Seed>, std::decay_t<Accumulator>>{std::forward<Seed>(seed), std::forward<Accumulator>(accumulator)};
Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/operators/scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace rpp::operators
* @see https://reactivex.io/documentation/operators/scan.html
*/
template<typename InitialValue, typename Fn>
requires (!utils::is_not_template_callable<Fn> || std::same_as<std::decay_t<InitialValue>, std::invoke_result_t<Fn, std::decay_t<InitialValue> &&, rpp::utils::convertible_to_any>>)
requires (!utils::is_not_template_callable<Fn> || std::same_as<std::decay_t<InitialValue>, std::invoke_result_t<Fn, std::decay_t<InitialValue>&&, rpp::utils::convertible_to_any>>)
auto scan(InitialValue&& initial_value, Fn&& accumulator)
{
return details::scan_t<std::decay_t<InitialValue>, std::decay_t<Fn>>{std::forward<InitialValue>(initial_value), std::forward<Fn>(accumulator)};
Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/schedulers/details/worker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace rpp::schedulers
{
public:
template<typename... Args>
requires (!rpp::constraint::variadic_decayed_same_as<worker<Strategy>, Args...> && rpp::constraint::is_constructible_from<Strategy, Args && ...>)
requires (!rpp::constraint::variadic_decayed_same_as<worker<Strategy>, Args...> && rpp::constraint::is_constructible_from<Strategy, Args&&...>)
explicit worker(Args&&... args)
: m_strategy(std::forward<Args>(args)...)
{
Expand Down
4 changes: 2 additions & 2 deletions src/rpp/rpp/utils/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ namespace rpp::utils
struct static_mem_fn
{
template<typename TT>
requires (Inverse == false && std::invocable<decltype(Fn), TT &&>)
requires (Inverse == false && std::invocable<decltype(Fn), TT&&>)
auto operator()(TT&& d) const
{
return (std::forward<TT>(d).*Fn)();
}

template<typename TT>
requires (Inverse == true && std::invocable<decltype(Fn), TT &&>)
requires (Inverse == true && std::invocable<decltype(Fn), TT&&>)
auto operator()(TT&& d) const
{
return !(std::forward<TT>(d).*Fn)();
Expand Down
Loading