mirror of
https://github.com/OlafvdSpek/ctemplate.git
synced 2025-09-28 19:05:49 +08:00
MSVC supports std::unordered_map KeyEqual
This commit is contained in:
parent
1ba73fa183
commit
4b8476e7c2
|
@ -125,15 +125,10 @@ class @ac_windows_dllexport@ PerExpandData {
|
|||
}
|
||||
|
||||
private:
|
||||
#ifdef _MSC_VER
|
||||
typedef @ac_cv_cxx_hash_map_class@<const char*, const void*, StringHash> DataMap;
|
||||
#else
|
||||
struct DataEq {
|
||||
bool operator()(const char* s1, const char* s2) const;
|
||||
};
|
||||
typedef @ac_cv_cxx_hash_map_class@<const char*, const void*, StringHash, DataEq>
|
||||
DataMap;
|
||||
#endif
|
||||
typedef @ac_cv_cxx_hash_map_class@<const char*, const void*, StringHash, DataEq> DataMap;
|
||||
|
||||
const char* annotate_path_;
|
||||
TemplateAnnotator* annotator_;
|
||||
|
|
0
src/ctemplate/template_annotator.h.in
Executable file → Normal file
0
src/ctemplate/template_annotator.h.in
Executable file → Normal file
0
src/ctemplate/template_namelist.h.in
Executable file → Normal file
0
src/ctemplate/template_namelist.h.in
Executable file → Normal file
0
src/ctemplate/template_string.h.in
Executable file → Normal file
0
src/ctemplate/template_string.h.in
Executable file → Normal file
|
@ -42,12 +42,10 @@ namespace ctemplate {
|
|||
|
||||
using std::string;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
bool PerExpandData::DataEq::operator()(const char* s1, const char* s2) const {
|
||||
return ((s1 == 0 && s2 == 0) ||
|
||||
(s1 && s2 && *s1 == *s2 && strcmp(s1, s2) == 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
PerExpandData::~PerExpandData() {
|
||||
delete map_;
|
||||
|
|
Loading…
Reference in New Issue
Block a user