[bugfix][clang]fix return type deduction for binary operators

parent 36c9cd4f
......@@ -206,19 +206,19 @@ namespace Dune {
#define DUNE_VECTORCLASS_BINARY(OP) \
template<class W> \
friend auto operator OP(const W &l, Proxy&& r) \
-> decltype(l OP value_type(std::move(r))) \
-> decltype(l OP std::declval<value_type&&>()) \
{ \
return l OP value_type(std::move(r)); \
} \
template<class W> \
auto operator OP(const W &r) && \
-> decltype(value_type(std::move(*this)) OP r) \
-> decltype(std::declval<value_type&&>() OP r) \
{ \
return value_type(std::move(*this)) OP r; \
} \
template<class W> \
auto operator OP(Proxy<W> &&r) && \
-> decltype(value_type(std::move(*this)) OP \
-> decltype(std::declval<value_type&&>() OP \
typename Proxy<W>::value_type(std::move(r))) \
{ \
return value_type(std::move(*this)) OP \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment