mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
workaround for gcc 3
This commit is contained in:
@@ -138,7 +138,12 @@ namespace YAML
|
|||||||
|
|
||||||
rhs.clear();
|
rhs.clear();
|
||||||
for(const_iterator it=node.begin();it!=node.end();++it)
|
for(const_iterator it=node.begin();it!=node.end();++it)
|
||||||
|
#if defined(__GNUC__) && __GNUC__ < 4
|
||||||
|
//workaround for GCC 3:
|
||||||
|
rhs[it->first.template as<K>()] = it->second.template as<V>();
|
||||||
|
#else
|
||||||
rhs[it->first.as<K>()] = it->second.as<V>();
|
rhs[it->first.as<K>()] = it->second.as<V>();
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -159,7 +164,12 @@ namespace YAML
|
|||||||
|
|
||||||
rhs.clear();
|
rhs.clear();
|
||||||
for(const_iterator it=node.begin();it!=node.end();++it)
|
for(const_iterator it=node.begin();it!=node.end();++it)
|
||||||
|
#if defined(__GNUC__) && __GNUC__ < 4
|
||||||
|
//workaround for GCC 3:
|
||||||
|
rhs.push_back(it->template as<T>());
|
||||||
|
#else
|
||||||
rhs.push_back(it->as<T>());
|
rhs.push_back(it->as<T>());
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -180,7 +190,12 @@ namespace YAML
|
|||||||
|
|
||||||
rhs.clear();
|
rhs.clear();
|
||||||
for(const_iterator it=node.begin();it!=node.end();++it)
|
for(const_iterator it=node.begin();it!=node.end();++it)
|
||||||
|
#if defined(__GNUC__) && __GNUC__ < 4
|
||||||
|
//workaround for GCC 3:
|
||||||
|
rhs.push_back(it->template as<T>());
|
||||||
|
#else
|
||||||
rhs.push_back(it->as<T>());
|
rhs.push_back(it->as<T>());
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user