0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Fixed decltype to work with g++

This commit is contained in:
Roland Bock 2013-08-17 11:23:54 +02:00
parent 712d3a5c53
commit 8914e3d18f

View File

@ -149,25 +149,25 @@ namespace sqlpp
} }
template<typename T> template<typename T>
auto operator +=(T&& t) const -> decltype(std::declval<Base>() = operator +(std::forward<T>(t))) auto operator +=(T&& t) const -> decltype(std::declval<Base>() = std::declval<Base>() + std::forward<T>(t))
{ {
return *static_cast<const Base*>(this) = operator +(std::forward<T>(t)); return *static_cast<const Base*>(this) = operator +(std::forward<T>(t));
} }
template<typename T> template<typename T>
auto operator -=(T&& t) const -> decltype(std::declval<Base>() = operator -(std::forward<T>(t))) auto operator -=(T&& t) const -> decltype(std::declval<Base>() = std::declval<Base>() - std::forward<T>(t))
{ {
return *static_cast<const Base*>(this) = operator -(std::forward<T>(t)); return *static_cast<const Base*>(this) = operator -(std::forward<T>(t));
} }
template<typename T> template<typename T>
auto operator /=(T&& t) const -> decltype(std::declval<Base>() = operator /(std::forward<T>(t))) auto operator /=(T&& t) const -> decltype(std::declval<Base>() = std::declval<Base>() / std::forward<T>(t))
{ {
return *static_cast<const Base*>(this) = operator /(std::forward<T>(t)); return *static_cast<const Base*>(this) = operator /(std::forward<T>(t));
} }
template<typename T> template<typename T>
auto operator *=(T&& t) const -> decltype(std::declval<Base>() = operator *(std::forward<T>(t))) auto operator *=(T&& t) const -> decltype(std::declval<Base>() = std::declval<Base>() * std::forward<T>(t))
{ {
return *static_cast<const Base*>(this) = operator *(std::forward<T>(t)); return *static_cast<const Base*>(this) = operator *(std::forward<T>(t));
} }