Skip to content

Commit

Permalink
Fix bug with projection_compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Aug 29, 2020
1 parent c769e51 commit 89eb52d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/cpp-sort/detail/projection_compare.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2017 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,6 +30,7 @@
#include <tuple>
#include <utility>
#include <cpp-sort/utility/as_function.h>
#include "type_traits.h"

namespace cppsort
{
Expand All @@ -40,8 +41,8 @@ namespace detail
{
private:

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

public:
Expand Down

0 comments on commit 89eb52d

Please sign in to comment.