freebsd-ports/math/frobby/files/patch-src_HashMap.h
Steve Wills 2da2d29922 math/frobby: create port
Frobby is a software system and project for computations with monomial
ideals. Frobby is free software and it is intended as a vehicle for
computational and mathematical research on monomial ideals.

The current functionality includes Euler characteristic, Hilbert
series, maximal standard monomials, combinatorial optimization on
monomial ideals, primary decomposition, irreducible decomposition,
Alexander dual, associated primes, minimization and intersection of
monomial ideals as well as the computation of Frobenius problems
(using 4ti2) with very large numbers. Frobby is also able to translate
between formats that can be used with several different computer
systems, such as Macaulay 2, Monos, 4ti2, CoCoA4 and Singular. Thus
Frobby can be used with any of those systems.

WWW: http://www.broune.com/frobby/

PR:		231208
Submitted by:	Lorenzo Salvadore <phascolarctos@protonmail.ch>
2019-03-19 16:04:10 +00:00

58 lines
1.5 KiB
C++

--- src/HashMap.h.orig 2018-09-05 21:12:33 UTC
+++ src/HashMap.h
@@ -34,55 +34,10 @@
template<class Key>
class FrobbyHash {};
-// *********************************************************
-#ifdef __GNUC__ // Only GCC defines this macro
-#include "hash_map/hash_map"
-#include <string>
-
-template<>
-class FrobbyHash<string> : public __gnu_cxx::hash<string> {
-};
-
-template<class Key, class Value>
-class HashMap : public __gnu_cxx::hash_map<Key, Value,
- FrobbyHash<Key> > {
-};
-
-#else
-
-// *********************************************************
-#ifdef _MSC_VER // Only Microsoft C++ defines this macro
-#include <hash_map>
-#include <string>
-
-template<class Key>
-class HashWrapper : public stdext::hash_compare<Key, ::std::less<Key> >, FrobbyHash<Key> {
-public:
- size_t operator()(const Key& key) const {
- return FrobbyHash<typename Key>::operator()(key);
- }
-
- bool operator()(const Key& a, const Key& b) const {
- return stdext::hash_compare<Key, ::std::less<Key> >::operator()(a, b);
- }
-};
-
-template<>
-class HashWrapper<string> : public stdext::hash_compare<string, ::std::less<string> > {
-};
-
-template<class Key, class Value>
-class HashMap : public stdext::hash_map<Key, Value, HashWrapper<Key> > {
-};
-
-// *********************************************************
-#else // Fall-back for unknown compilers
#include <map>
template<class Key, class Value>
class HashMap : public std::map<Key, Value> {
};
-#endif
-#endif
#endif