Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Fix issue with seq_traits
Browse files Browse the repository at this point in the history
seq_traits always fronted const types because of a
template parameter glitch.
  • Loading branch information
clechasseur committed Sep 21, 2017
1 parent 3d91484 commit 3f84971
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/coveo/linq/detail/linq_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ namespace detail {
// that infers the sequence's value_type from the return value of its iterators.
// Also provides the type of iterator used by the sequence.
template<typename Seq>
struct seq_traits : public coveo::detail::seq_element_traits<decltype(*std::begin(std::declval<Seq>()))>
struct seq_traits : public coveo::detail::seq_element_traits<decltype(*std::begin(std::declval<Seq&>()))>
{
typedef typename std::decay<decltype(std::begin(std::declval<Seq>()))>::type iterator_type; // Type of iterator used by the sequence
typedef typename std::decay<decltype(std::begin(std::declval<Seq&>()))>::type iterator_type; // Type of iterator used by the sequence
};
template<typename Seq> struct seq_traits<Seq&> : seq_traits<Seq> { };
template<typename Seq> struct seq_traits<Seq&&> : seq_traits<Seq> { };
Expand Down Expand Up @@ -2035,12 +2035,6 @@ class order_by_impl_with_seq
template<typename Cmp>
class order_by_impl
{
// Type trait used to identify impls with sequences, to differenciate them from
// the actual sequences we'll be receiving.
template<typename> struct is_order_by_impl_with_seq : std::false_type { };
template<typename _Seq, typename _Cmp>
struct is_order_by_impl_with_seq<order_by_impl_with_seq<_Seq, _Cmp>> : std::true_type { };

private:
std::unique_ptr<Cmp> upcmp_; // Comparator used to order a sequence.

Expand Down

0 comments on commit 3f84971

Please sign in to comment.