mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-12 14:54:10 +00:00
fix complex, rational
This commit is contained in:
parent
cdb10c0fbe
commit
6b3f7ad894
19 changed files with 1568 additions and 1360 deletions
19
sprout/complex/hash.hpp
Normal file
19
sprout/complex/hash.hpp
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue