fix complex, rational

This commit is contained in:
bolero-MURAKAMI 2012-08-29 01:16:12 +09:00
parent cdb10c0fbe
commit 6b3f7ad894
19 changed files with 1568 additions and 1360 deletions

19
sprout/complex/hash.hpp Normal file
View file

@ -0,0 +1,19 @@
#ifndef SPROUT_COMPLEX_HASH_HPP
#define SPROUT_COMPLEX_HASH_HPP
#include <cstddef>
#include <sprout/config.hpp>
#include <sprout/complex/complex.hpp>
#include <sprout/functional/hash/hash.hpp>
namespace sprout {
//
// hash_value
//
template<typename T>
inline SPROUT_CONSTEXPR std::size_t hash_value(sprout::complex<T> const& v) {
return sprout::hash_values(v.real(), v.imag());
}
} // namespace sprout
#endif // #ifndef SPROUT_COMPLEX_HASH_HPP