Commit e1f150b6 authored by Christian Engwer's avatar Christian Engwer

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

Merge branch 'fix_return_type_deduction_for_clang' into 'master'

ref:extensions/dune-vectorclass\> This fixes a compilation error in clang

See merge request [!19]

  [!19]: gitlab.dune-project.org/extensions/dune-vectorclass/merge_requests/19
parents 7c7a4ced be675a50
Pipeline #26285 failed with stage
in 4 minutes and 55 seconds
......@@ -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