1
0
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:
Olaf van der Spek 2017-01-22 14:40:30 +01:00
parent 1ba73fa183
commit 4b8476e7c2
5 changed files with 1 additions and 8 deletions

View File

@ -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
View File

0
src/ctemplate/template_namelist.h.in Executable file → Normal file
View File

0
src/ctemplate/template_string.h.in Executable file → Normal file
View File

View 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_;