aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <GabrielDosReis@users.noreply.github.com>2022-08-15 18:56:02 -0700
committerGabriel Dos Reis <GabrielDosReis@users.noreply.github.com>2022-08-15 18:56:02 -0700
commitd439c3aa737e9a35de4699c2612c68d104013cae (patch)
tree8c6731dea814bb153bdf9ef772186145970492fd
parentdf38376232d71863f7807577edfe0f3e5995aaca (diff)
downloadopen-axiom-d439c3aa737e9a35de4699c2612c68d104013cae.tar.gz
Stop referencing `std::hash<T>::result_type`
-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 {