Skip to content

Commit

Permalink
Post-mortem for issue #139
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Mar 22, 2021
1 parent ddcadeb commit 0c07f38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions include/cpp-sort/adapters/stable_adapter.h
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2020 Morwenn
* Copyright (c) 2016-2021 Morwenn
* SPDX-License-Identifier: MIT
*/
#ifndef CPPSORT_ADAPTERS_STABLE_ADAPTER_H_
Expand All @@ -25,6 +25,7 @@
#include "../detail/iterator_traits.h"
#include "../detail/memory.h"
#include "../detail/sized_iterator.h"
#include "../detail/type_traits.h"

namespace cppsort
{
Expand All @@ -41,8 +42,12 @@ namespace cppsort
{
private:

using projection_t = decltype(utility::as_function(std::declval<Projection&>()));
using compare_t = decltype(utility::as_function(std::declval<Compare&>()));
using projection_t = detail::remove_cvref_t<
decltype(utility::as_function(std::declval<Projection>()))
>;
using compare_t = detail::remove_cvref_t<
decltype(utility::as_function(std::declval<Compare>()))
>;
std::tuple<compare_t, projection_t> data;

public:
Expand Down
4 changes: 2 additions & 2 deletions include/cpp-sort/comparators/projection_compare.h
Expand Up @@ -22,10 +22,10 @@ namespace cppsort
private:

using compare_t = detail::remove_cvref_t<
decltype(utility::as_function(std::declval<Compare&>()))
decltype(utility::as_function(std::declval<Compare>()))
>;
using projection_t = detail::remove_cvref_t<
decltype(utility::as_function(std::declval<Projection&>()))
decltype(utility::as_function(std::declval<Projection>()))
>;
std::tuple<compare_t, projection_t> data;

Expand Down

0 comments on commit 0c07f38

Please sign in to comment.