aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Dos Reis <GabrielDosReis@users.noreply.github.com>2022-08-17 00:20:19 -0700
committerGitHub <noreply@github.com>2022-08-17 00:20:19 -0700
commitf9a884706ac7e0f92db5e6cb16811d543a98ac28 (patch)
tree8c6731dea814bb153bdf9ef772186145970492fd /src
parentdf38376232d71863f7807577edfe0f3e5995aaca (diff)
parentd439c3aa737e9a35de4699c2612c68d104013cae (diff)
downloadopen-axiom-f9a884706ac7e0f92db5e6cb16811d543a98ac28.tar.gz
Merge pull request #15 from GabrielDosReis/gdr/hash-function-result
Stop referencing `std::hash<T>::result_type`
Diffstat (limited to 'src')
-rw-r--r--src/include/open-axiom/Lisp35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/include/open-axiom/Lisp b/src/include/open-axiom/Lisp
index dff5c769..5b34242a 100644
--- a/src/include/open-axiom/Lisp
+++ b/src/include/open-axiom/Lisp
@@ -46,25 +46,22 @@
#include <iosfwd>
#include <unordered_set>
-namespace std {
- template<>
- struct hash<OpenAxiom::VM::Package> {
- hash<OpenAxiom::VM::String>::result_type
- operator()(const OpenAxiom::VM::Package& s) const {
- return h(s.name);
- }
- hash<OpenAxiom::VM::String> h;
- };
-
- template<>
- struct equal_to<OpenAxiom::VM::Package> {
- using arg_type = OpenAxiom::VM::Package;
- bool operator()(const arg_type& x, const arg_type& y) const {
- constexpr equal_to<OpenAxiom::VM::String> eq { };
- return eq(x.name, y.name);
- }
- };
-}
+template<>
+struct std::hash<OpenAxiom::VM::Package> {
+ auto operator()(const OpenAxiom::VM::Package& s) const {
+ return h(s.name);
+ }
+ hash<OpenAxiom::VM::String> h;
+};
+
+template<>
+struct std::equal_to<OpenAxiom::VM::Package> {
+ using arg_type = OpenAxiom::VM::Package;
+ bool operator()(const arg_type& x, const arg_type& y) const {
+ constexpr equal_to<OpenAxiom::VM::String> eq { };
+ return eq(x.name, y.name);
+ }
+};
namespace OpenAxiom {
namespace Lisp {