diff options
author | randomdan <randomdan@localhost> | 2011-07-29 16:00:24 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-07-29 16:00:24 +0000 |
commit | a2e690cf5ae973a5f2195414197ecb3c6d39f551 (patch) | |
tree | 6261d084d96f24582e25117101b5f7f69353af63 | |
parent | Half decent error handling in scripts with project2:handler[try/catch/finally] (diff) | |
download | project2-a2e690cf5ae973a5f2195414197ecb3c6d39f551.tar.bz2 project2-a2e690cf5ae973a5f2195414197ecb3c6d39f551.tar.xz project2-a2e690cf5ae973a5f2195414197ecb3c6d39f551.zip |
Work around old compiler bug by fully qualifying function call to not get mixed up with a class in ns std
-rw-r--r-- | project2/variableConvert.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/project2/variableConvert.cpp b/project2/variableConvert.cpp index 0f69a52..b144175 100644 --- a/project2/variableConvert.cpp +++ b/project2/variableConvert.cpp @@ -24,7 +24,7 @@ template <typename T> const T * set(const VariableType * var, const T * t) { - return set(var, t, deleter<T>); + return ::set(var, t, deleter<T>); } SimpleMessageException(InvalidConversionTo); @@ -41,17 +41,17 @@ class ConvertVisitorGlibUstring : public boost::static_visitor<const Glib::ustri ConvertVisitorGlibUstring(const VariableType * v) : var(v) { } const Glib::ustring & operator()(const Glib::ustring & r) const { - return *set(var, &r, NULL); + return *::set(var, &r, NULL); } const Glib::ustring & operator()(const boost::posix_time::ptime & r) const { - return *set(var, new Glib::ustring(boost::posix_time::to_iso_extended_string(r))); + return *::set(var, new Glib::ustring(boost::posix_time::to_iso_extended_string(r))); } const Glib::ustring & operator()(const Null &) const { throw NullVariable(); } template <typename T> const Glib::ustring & operator()(const T & r) const { - return *set(var, new Glib::ustring(boost::lexical_cast<Glib::ustring>(r))); + return *::set(var, new Glib::ustring(boost::lexical_cast<Glib::ustring>(r))); } private: const VariableType * var; @@ -62,17 +62,17 @@ class ConvertVisitorStdString : public boost::static_visitor<const std::string & ConvertVisitorStdString(const VariableType * v) : var(v) { } const std::string & operator()(const Glib::ustring & r) const { - return *set(var, new std::string(r)); + return *::set(var, new std::string(r)); } const std::string & operator()(const boost::posix_time::ptime & r) const { - return *set(var, new std::string(boost::posix_time::to_iso_extended_string(r))); + return *::set(var, new std::string(boost::posix_time::to_iso_extended_string(r))); } const std::string & operator()(const Null &) const { throw NullVariable(); } template <typename T> const std::string & operator()(const T & r) const { - return *set(var, new std::string(boost::lexical_cast<std::string>(r))); + return *::set(var, new std::string(boost::lexical_cast<std::string>(r))); } private: const VariableType * var; @@ -83,17 +83,17 @@ class ConvertVisitorCharStar : public boost::static_visitor<const char *> { ConvertVisitorCharStar(const VariableType * v) : var(v) { } const char * operator()(const Glib::ustring & r) const { - return set(var, &r, NULL)->c_str(); + return ::set(var, &r, NULL)->c_str(); } const char * operator()(const boost::posix_time::ptime & r) const { - return set(var, new std::string(boost::posix_time::to_iso_extended_string(r)))->c_str(); + return ::set(var, new std::string(boost::posix_time::to_iso_extended_string(r)))->c_str(); } const char * operator()(const Null &) const { - return set<char>(var, NULL, NULL); + return ::set<char>(var, NULL, NULL); } template <typename T> const char * operator()(const T & r) const { - return set(var, new std::string(boost::lexical_cast<std::string>(r)))->c_str(); + return ::set(var, new std::string(boost::lexical_cast<std::string>(r)))->c_str(); } private: const VariableType * var; @@ -108,14 +108,14 @@ class ConvertVisitorUCharStar : public boost::static_visitor<const unsigned char } const unsigned char * operator()(const boost::posix_time::ptime & r) const { return reinterpret_cast<const unsigned char *>( - set(var, new std::string(boost::posix_time::to_iso_extended_string(r)))->c_str()); + ::set(var, new std::string(boost::posix_time::to_iso_extended_string(r)))->c_str()); } const unsigned char * operator()(const Null &) const { - return set<unsigned char>(var, NULL, NULL); + return ::set<unsigned char>(var, NULL, NULL); } template <typename T> const unsigned char * operator()(const T & r) const { - return set(var, new std::basic_string<unsigned char>(boost::lexical_cast<std::basic_string<unsigned char> >(r)))->c_str(); + return ::set(var, new std::basic_string<unsigned char>(boost::lexical_cast<std::basic_string<unsigned char> >(r)))->c_str(); } private: const VariableType * var; @@ -148,7 +148,7 @@ class ConvertVisitorDateTime : public boost::static_visitor<const boost::posix_t ConvertVisitorDateTime(const VariableType * v) : var(v) { } const boost::posix_time::ptime & operator()(const Glib::ustring & r) const { - return *set(var, new boost::posix_time::ptime(boost::posix_time::time_from_string(r)), deleter<boost::posix_time::ptime>); + return *::set(var, new boost::posix_time::ptime(boost::posix_time::time_from_string(r)), deleter<boost::posix_time::ptime>); } const boost::posix_time::ptime & operator()(const boost::posix_time::ptime & r) const { return r; |