diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-07-21 11:30:21 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-07-21 11:30:21 +0000 |
commit | 7f2018d882b95cfbf5cec0afd22770a30331a5ef (patch) | |
tree | 960c2995632b538aae73e3a4c2142a4cc8cc3c13 | |
parent | 259973308b7e05f0e53a54de901ae9d937ff1a55 (diff) | |
download | ATCD-7f2018d882b95cfbf5cec0afd22770a30331a5ef.tar.gz |
-rw-r--r-- | CIAO/tools/Config_Handlers/XSCRT/Elements.hpp | 147 |
1 files changed, 74 insertions, 73 deletions
diff --git a/CIAO/tools/Config_Handlers/XSCRT/Elements.hpp b/CIAO/tools/Config_Handlers/XSCRT/Elements.hpp index 2f14dcae7e2..10f89e3f976 100644 --- a/CIAO/tools/Config_Handlers/XSCRT/Elements.hpp +++ b/CIAO/tools/Config_Handlers/XSCRT/Elements.hpp @@ -289,80 +289,10 @@ namespace XSCRT X x_; }; -#if (!defined (_MSC_VER)) && \ - (__GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ > 2))) - - // Stuff for normal compilers. - // - - // Specialization for `signed char' - // - // - template<> - template<typename C> - inline - FundamentalType<signed char>:: - FundamentalType (XML::Element<C> const& e) - { - std::basic_stringstream<C> s; - s << e.value (); - - short t; - s >> t; - - x_ = static_cast<signed char> (t); - } - - template<> - template<typename C> - inline - FundamentalType<signed char>:: - FundamentalType (XML::Attribute<C> const& a) - { - std::basic_stringstream<C> s; - s << a.value (); - - short t; - s >> t; - - x_ = static_cast<signed char> (t); - } - - // Specialization for `unsigned char' - // - // - template<> - template<typename C> - inline - FundamentalType<unsigned char>:: - FundamentalType (XML::Element<C> const& e) - { - std::basic_stringstream<C> s; - s << e.value (); - - unsigned short t; - s >> t; - - x_ = static_cast<unsigned char> (t); - } - - template<> - template<typename C> - inline - FundamentalType<unsigned char>:: - FundamentalType (XML::Attribute<C> const& a) - { - std::basic_stringstream<C> s; - s << a.value (); - - unsigned short t; - s >> t; - - x_ = static_cast<unsigned char> (t); - } - -#else +#if ((defined (__GNUC__) && (__GNUC__ == 3 && (__GNUC_MINOR__ < 3))) || \ + (defined (__BORLANDC__) && (__BORLANDC__ < 0x620)) || \ + (defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x570))) // Stuff for broken VC6 & gcc < 3.3. Don't like what you see - use better // compiler! @@ -490,6 +420,77 @@ namespace XSCRT unsigned char x_; }; +#else + + // Stuff for normal compilers. + // + + // Specialization for `signed char' + // + // + template<> + template<typename C> + inline + FundamentalType<signed char>:: + FundamentalType (XML::Element<C> const& e) + { + std::basic_stringstream<C> s; + s << e.value (); + + short t; + s >> t; + + x_ = static_cast<signed char> (t); + } + + template<> + template<typename C> + inline + FundamentalType<signed char>:: + FundamentalType (XML::Attribute<C> const& a) + { + std::basic_stringstream<C> s; + s << a.value (); + + short t; + s >> t; + + x_ = static_cast<signed char> (t); + } + + // Specialization for `unsigned char' + // + // + template<> + template<typename C> + inline + FundamentalType<unsigned char>:: + FundamentalType (XML::Element<C> const& e) + { + std::basic_stringstream<C> s; + s << e.value (); + + unsigned short t; + s >> t; + + x_ = static_cast<unsigned char> (t); + } + + template<> + template<typename C> + inline + FundamentalType<unsigned char>:: + FundamentalType (XML::Attribute<C> const& a) + { + std::basic_stringstream<C> s; + s << a.value (); + + unsigned short t; + s >> t; + + x_ = static_cast<unsigned char> (t); + } + #endif |