mirror of
https://github.com/triqs/dft_tools
synced 2024-12-26 06:14:14 +01:00
Fix #42. Conj overload issue
std::conj returns a complex according to std. On gcc, we need to define it (bug?) but on clang libc++ it is an error. -> one test is still failing : to be decided later
This commit is contained in:
parent
dce4edbdde
commit
8cc5012347
@ -24,11 +24,14 @@
|
|||||||
#include <boost/preprocessor/seq/for_each.hpp>
|
#include <boost/preprocessor/seq/for_each.hpp>
|
||||||
namespace triqs { namespace arrays {
|
namespace triqs { namespace arrays {
|
||||||
|
|
||||||
|
// not for libc++ (already defined)
|
||||||
|
#if !defined(_LIBCPP_VERSION)
|
||||||
// complex conjugation for integers
|
// complex conjugation for integers
|
||||||
inline int conj(int x) { return x; }
|
inline int conj(int x) { return x; }
|
||||||
inline long conj(long x) { return x; }
|
inline long conj(long x) { return x; }
|
||||||
inline long long conj(long long x) { return x; }
|
inline long long conj(long long x) { return x; }
|
||||||
inline double conj(double x) { return x; }
|
inline std::complex<double> conj(double x) { return x; }
|
||||||
|
#endif
|
||||||
|
|
||||||
//C++14 will simply be ...
|
//C++14 will simply be ...
|
||||||
//template <typename A> decltype(auto) abs(A && a) { return map( [](auto const &x) { using std::abs; return abs(a);}, std::forward<A>(a));}
|
//template <typename A> decltype(auto) abs(A && a) { return map( [](auto const &x) { using std::abs; return abs(a);}, std::forward<A>(a));}
|
||||||
|
Loading…
Reference in New Issue
Block a user