From a264582df1baa6223f88804e141b3c38a240b684 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Tue, 11 Sep 2012 03:32:41 +0000 Subject: [PATCH] VS 71 Data compile --- Data/src/Date.cpp | 14 +++++++++++++- Data/src/DynamicLOB.cpp | 7 +++++++ Data/src/Time.cpp | 14 +++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Data/src/Date.cpp b/Data/src/Date.cpp index a6816692d..254ef69ad 100644 --- a/Data/src/Date.cpp +++ b/Data/src/Date.cpp @@ -114,7 +114,13 @@ bool Date::operator < (const Date& date) Date& Date::operator = (const Var& var) { - *this = var.operator Date(); // g++ workaround +#ifndef __GNUC__ +// g++ used to choke on this, newer versions seem to digest it fine +// TODO: determine the version able to handle it properly + *this = var.extract(); +#else + *this = var.operator Date(); +#endif return *this; } @@ -122,6 +128,9 @@ Date& Date::operator = (const Var& var) } } // namespace Poco::Data +#ifdef __GNUC__ +// only needed for g++ (see comment in Date::operator = above) + namespace Poco { namespace Dynamic { @@ -148,3 +157,6 @@ Var::operator Date () const } } // namespace Poco::Dynamic + + +#endif // __GNUC__ diff --git a/Data/src/DynamicLOB.cpp b/Data/src/DynamicLOB.cpp index 72a2dc149..b99d70825 100644 --- a/Data/src/DynamicLOB.cpp +++ b/Data/src/DynamicLOB.cpp @@ -34,6 +34,9 @@ // +#ifdef __GNUC__ +// TODO: determine g++ version able to do the right thing without these specializations + #include "Poco/Data/DynamicLOB.h" #include "Poco/Data/LOB.h" #include "Poco/Dynamic/Var.h" @@ -83,3 +86,7 @@ Var::operator BLOB () const } } // namespace Poco::Data + + +#endif // __GNUC__ + diff --git a/Data/src/Time.cpp b/Data/src/Time.cpp index e3d6e641c..cc57cc697 100644 --- a/Data/src/Time.cpp +++ b/Data/src/Time.cpp @@ -111,7 +111,13 @@ bool Time::operator < (const Time& time) Time& Time::operator = (const Var& var) { - *this = var.operator Time(); // g++ workaround +#ifndef __GNUC__ +// g++ used to choke on this, newer versions seem to digest it fine +// TODO: determine the version able to handle it properly + *this = var.extract