Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ if(NOT CMAKE_BUILD_TYPE)
endif()

add_cxx_flag("-Wall")
add_cxx_flag("-Wno-deprecated")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep -Wno-deprecated to prevent people from re-introducing deprecated functions/classes.

add_cxx_flag("-std=gnu++11")

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down
2 changes: 1 addition & 1 deletion src/check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std::vector<Expr *> ascHoles;

Trie<pair<Expr *, Expr *> > *symbols = new Trie<pair<Expr *, Expr *> >;

hash_map<string, bool> imports;
std::unordered_map<string, bool> imports;
std::map<SymExpr *, int> mark_map;
std::vector<std::pair<std::string, std::pair<Expr *, Expr *> > >
local_sym_names;
Expand Down
19 changes: 3 additions & 16 deletions src/check.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <stdio.h>
#include <hash_map>
#else
#include <ext/hash_map>
#include <unordered_map>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eliminate _MSC_VER case (hash_map is deprecated).

#endif

#include <cstddef>
Expand Down Expand Up @@ -158,8 +158,8 @@ inline const char *prefix_id(bool skip_ws = true)
typedef std::hash_map<std::string, Expr *> symmap;
typedef std::hash_map<std::string, SymExpr *> symmap2;
#else
typedef __gnu_cxx::hash_map<std::string, Expr *> symmap;
typedef __gnu_cxx::hash_map<std::string, SymExpr *> symmap2;
typedef std::unordered_map<std::string, Expr *> symmap;
typedef std::unordered_map<std::string, SymExpr *> symmap2;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eliminate _MSC_VER case.

extern symmap2 progs;
extern std::vector<Expr *> ascHoles;
Expand All @@ -171,19 +171,6 @@ extern std::map<SymExpr *, int> mark_map;
extern std::vector<std::pair<std::string, std::pair<Expr *, Expr *> > >
local_sym_names;

#ifndef _MSC_VER
namespace __gnu_cxx {
template <>
struct hash<std::string>
{
size_t operator()(const std::string &x) const
{
return hash<const char *>()(x.c_str());
}
};
} // namespace __gnu_cxx
#endif

extern Expr *statMpz;
extern Expr *statMpq;
extern Expr *statType;
Expand Down