diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index f78332a..6f19d8e 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -138,7 +138,12 @@ namespace YAML rhs.clear(); for(const_iterator it=node.begin();it!=node.end();++it) +#if defined(__GNUC__) && __GNUC__ < 4 +//workaround for GCC 3: + rhs[it->first.template as()] = it->second.template as(); +#else rhs[it->first.as()] = it->second.as(); +#endif return true; } }; @@ -159,7 +164,12 @@ namespace YAML rhs.clear(); 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()); +#else rhs.push_back(it->as()); +#endif return true; } }; @@ -180,7 +190,12 @@ namespace YAML rhs.clear(); 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()); +#else rhs.push_back(it->as()); +#endif return true; } };