Skip to content

Commit 98280e3

Browse files
committed
detail::quickval<> => std::declval<>
1 parent 6e54d61 commit 98280e3

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

mainframe/detail/base.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ const char* get_emptyspace(size_t num);
2323
size_t get_max_string_length(const std::vector<std::string>&);
2424
std::vector<size_t> get_max_string_lengths(const std::vector<std::vector<std::string>>&);
2525

26-
template<typename T>
27-
struct quickval
28-
{
29-
static T value;
30-
};
31-
3226
template<typename T>
3327
auto
3428
stringify(std::ostream& o, const T& t, bool) -> decltype(o << t, o)

mainframe/detail/expression.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ struct binary_expr
423423
operator()(const Iter<IsConst, IsReverse, Ts...>& begin,
424424
const Iter<IsConst, IsReverse, Ts...>& curr,
425425
const Iter<IsConst, IsReverse, Ts...>& end) const
426-
-> decltype(Op::exec(detail::quickval<L>::value.
426+
-> decltype(Op::exec(std::declval<L&>().
427427
operator()(begin, curr, end),
428-
detail::quickval<R>::value.
428+
std::declval<R&>().
429429
operator()(begin, curr, end)))
430430
{
431431
return Op::exec(l.operator()(begin, curr, end), r.operator()(begin, curr, end));
@@ -454,7 +454,7 @@ struct unary_expr
454454
operator()(const Iter<IsConst, IsReverse, Ts...>& begin,
455455
const Iter<IsConst, IsReverse, Ts...>& curr,
456456
const Iter<IsConst, IsReverse, Ts...>& end) const
457-
-> decltype(Op::exec(detail::quickval<T>::value.
457+
-> decltype(Op::exec(std::declval<T&>().
458458
operator()(curr)))
459459
{
460460
return Op::exec(t.operator()(begin, curr, end));

0 commit comments

Comments
 (0)