Skip to content

Commit

Permalink
Remove container_aware_adapter dependency on cppsort::sort
Browse files Browse the repository at this point in the history
This mainly done as part of issue #167, but also improves the situation
a bit for issues #28 and #125.
  • Loading branch information
Morwenn committed Jul 17, 2020
1 parent 7ff8716 commit 18f6d92
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions 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
Expand Down Expand Up @@ -30,7 +30,6 @@
#include <functional>
#include <type_traits>
#include <utility>
#include <cpp-sort/sort.h>
#include <cpp-sort/sorter_facade.h>
#include <cpp-sort/sorter_traits.h>
#include <cpp-sort/utility/adapter_storage.h>
Expand Down Expand Up @@ -145,11 +144,11 @@ namespace cppsort
conditional_t<
Stability,
cppsort::is_stable<Sorter(Iterable&)>,
decltype(cppsort::sort(this->get(), iterable))
decltype(this->get()(iterable))
>
>
{
return cppsort::sort(this->get(), iterable);
return this->get()(iterable);
}

template<
Expand Down Expand Up @@ -182,11 +181,11 @@ namespace cppsort
conditional_t<
Stability,
cppsort::is_stable<Sorter(Iterable&, Compare)>,
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<
Expand Down Expand Up @@ -275,11 +274,11 @@ namespace cppsort
conditional_t<
Stability,
cppsort::is_stable<Sorter(Iterable&, Projection)>,
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<
Expand Down Expand Up @@ -348,13 +347,11 @@ namespace cppsort
conditional_t<
Stability,
cppsort::is_stable<Sorter(Iterable&, Compare, Projection)>,
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));
}
};
}
Expand Down

0 comments on commit 18f6d92

Please sign in to comment.