From 18f6d922a6e120dbbeb6a1880809315aade2f8c9 Mon Sep 17 00:00:00 2001 From: Morwenn Date: Sat, 18 Jul 2020 00:30:48 +0200 Subject: [PATCH] Remove container_aware_adapter dependency on cppsort::sort This mainly done as part of issue #167, but also improves the situation a bit for issues #28 and #125. --- .../adapters/container_aware_adapter.h | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/include/cpp-sort/adapters/container_aware_adapter.h b/include/cpp-sort/adapters/container_aware_adapter.h index 91296d25..cf54abef 100644 --- a/include/cpp-sort/adapters/container_aware_adapter.h +++ b/include/cpp-sort/adapters/container_aware_adapter.h @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2016-2019 Morwenn + * Copyright (c) 2016-2020 Morwenn * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -145,11 +144,11 @@ namespace cppsort conditional_t< Stability, cppsort::is_stable, - decltype(cppsort::sort(this->get(), iterable)) + decltype(this->get()(iterable)) > > { - return cppsort::sort(this->get(), iterable); + return this->get()(iterable); } template< @@ -182,11 +181,11 @@ namespace cppsort conditional_t< Stability, cppsort::is_stable, - decltype(cppsort::sort(this->get(), iterable, std::move(compare))) + decltype(this->get()(iterable, std::move(compare))) > > { - return cppsort::sort(this->get(), iterable, std::move(compare)); + return this->get()(iterable, std::move(compare)); } template< @@ -275,11 +274,11 @@ namespace cppsort conditional_t< Stability, cppsort::is_stable, - decltype(cppsort::sort(this->get(), iterable, std::move(projection))) + decltype(this->get()(iterable, std::move(projection))) > > { - return cppsort::sort(this->get(), iterable, std::move(projection)); + return this->get()(iterable, std::move(projection)); } template< @@ -348,13 +347,11 @@ namespace cppsort conditional_t< Stability, cppsort::is_stable, - decltype(cppsort::sort(this->get(), iterable, - std::move(compare), std::move(projection))) + decltype(this->get()(iterable, std::move(compare), std::move(projection))) > > { - return cppsort::sort(this->get(), iterable, - std::move(compare), std::move(projection)); + return this->get()(iterable, std::move(compare), std::move(projection)); } }; }