Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 11, 2008, 4:40:01 PM (16 years ago)
Author:
rgrieder
Message:

gcc test commit again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/util/Convert.h

    r1766 r1768  
    5050#endif
    5151
    52 ///////////////////////////////////
    53 // Explicit Conversion Functions //
    54 ///////////////////////////////////
    55 
    56 
    5752///////////////////////////////////////////////
    5853// Static detection for conversion functions //
     
    9691            return *(new conversionTests::VeryBigStruct());
    9792    }
    98 }
    99 
    100 namespace conversionTests
    101 {
    102     // Part of the msvc hack. See above in the namespace for more explanations.
    103     using namespace separate_namespace;
    10493
    10594    // These operators simply accept anything but have lower priority than specialisations
     
    111100    template <class Any>
    112101    conversionTests::VeryBigStruct operator>>(std::istream& instream,  const Any anything);
     102}
     103
     104namespace conversionTests
     105{
     106    // Part of the msvc hack. See above in the namespace for more explanations.
     107    using namespace separate_namespace;
    113108
    114109    template <class FromType, class ToType>
     
    144139    {
    145140        IStringStreamOperator(); IStringStreamOperator(const IStringStreamOperator&); ~IStringStreamOperator();
    146         static std::istringstream istream_; // helper object to perform the '>>' operation
     141        static std::istream istream_; // helper object to perform the '>>' operation
    147142        static Type object;                 // helper object to handle private c'tor and d'tor
    148143    public:
     
    154149    {
    155150        OStringStreamOperator(); OStringStreamOperator(const OStringStreamOperator&); ~OStringStreamOperator();
    156         static std::ostringstream ostream_; // helper object to perform the '<<' operation
     151        static std::ostream ostream_; // helper object to perform the '<<' operation
    157152        static Type object;                 // helper object to handle private c'tor and d'tor
    158153    public:
     
    169164    Usage: ImplicitConversion<FromType, ToType>::exists
    170165*/
    171 template <class FromType, class ToType>
    172 struct ImplicitConversion
    173 { enum { exists = conversionTests::ImplicitConversion<FromType, ToType>::exists }; };
     166//template <class FromType, class ToType>
     167//struct ImplicitConversion
     168//{ enum { exists = conversionTests::asdf::ImplicitConversion<FromType, ToType>::exists }; };
    174169
    175170/**
     
    179174    Usage: ExplicitConversion<FromType, ToType>::exists
    180175*/
    181 template <class FromType, class ToType>
    182 struct ExplicitConversion
    183 { enum { exists = conversionTests::ExplicitConversion<FromType, ToType>::exists }; };
     176//template <class FromType, class ToType>
     177//struct ExplicitConversion
     178//{ enum { exists = conversionTests::asdf::ExplicitConversion<FromType, ToType>::exists }; };
    184179
    185180/**
     
    189184    Usage: IStringStreamConversion<FromType, ToType>::exists
    190185*/
    191 template <class Type>
    192 struct IStringStreamOperator
    193 { enum { exists = conversionTests::IStringStreamOperator<Type>::exists }; };
     186//template <class Type>
     187//struct IStringStreamOperator
     188//{ enum { exists = conversionTests::asdf::IStringStreamOperator<Type>::exists }; };
    194189
    195190/**
     
    199194    Usage: OStringStreamConversion<FromType, ToType>::exists
    200195*/
    201 template <class Type>
    202 struct OStringStreamOperator
    203 { enum { exists = conversionTests::OStringStreamOperator<Type>::exists }; };
     196//template <class Type>
     197//struct OStringStreamOperator
     198//{ enum { exists = conversionTests::asdf::OStringStreamOperator<Type>::exists }; };
    204199
    205200
     
    286281        static bool convert(std::string* output, const FromType& input)
    287282        {
    288             const bool probe = OStringStreamOperator<FromType>::exists;
     283            const bool probe = conversionTests::OStringStreamOperator<FromType>::exists;
    289284            return convert(output, input, StringStreamPossible<probe>());
    290285        }
     
    328323        static bool convert(ToType* output, const std::string& input)
    329324        {
    330             const bool probe = IStringStreamOperator<ToType>::exists;
     325            const bool probe = conversionTests::IStringStreamOperator<ToType>::exists;
    331326            return convert(output, input, StringStreamPossible<probe>());
    332327        }
     
    381376    inline bool convert(ToType* output, const FromType& input, ExplicitPossible<false>)
    382377    {
    383         const bool probe = ImplicitConversion<FromType, ToType>::exists;
     378        const bool probe = conversionTests::ImplicitConversion<FromType, ToType>::exists;
    384379        return convert(output, input, ImplicitPossible<probe>());
    385380    }
     
    398393    {
    399394        // check for explicit conversion via function overloading
    400         const bool probe = ExplicitConversion<FromType, ToType>::exists;
     395        const bool probe = conversionTests::ExplicitConversion<FromType, ToType>::exists;
    401396        return conversion::convert(output, input, conversion::ExplicitPossible<probe>());
    402397    }
Note: See TracChangeset for help on using the changeset viewer.