Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1744 for code/branches/core3


Ignore:
Timestamp:
Sep 8, 2008, 6:47:51 PM (16 years ago)
Author:
rgrieder
Message:

gcc doesn't like ellipsis, replaced it with a template

File:
1 edited

Legend:

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

    r1743 r1744  
    7777struct TemplateDebugger
    7878{
    79     static int debug(int c, int d) { BOOST_STATIC_ASSERT(0); }
     79    static int debug(int c, int d) { return 0; } //BOOST_STATIC_ASSERT(0); }
    8080};
    8181
     
    100100        // We have to make sure noboy uses it, so a good compiler error would be nice.
    101101        *output = (AnyToType)input; // Do not use this function!
    102         BOOST_STATIC_ASSERT(0); // just to be sure
     102        //BOOST_STATIC_ASSERT(0); // just to be sure
     103                return *(new conversionTests::VeryBigStruct());
    103104    }
    104105}
     
    118119    private:
    119120        static VerySmallStruct test(ToType); // only accepts ToType, but is preferred over '...'
    120         static VeryBigStruct   test(...);    // accepts anything
     121                template <class AnyType>
     122        static VeryBigStruct   test(const AnyType anything);    // accepts anything
    121123        static FromType object; // helper object to handle private c'tor and d'tor
    122124    public:
     
    357359        // convert from const char* via std::string
    358360        static bool convert(ToType* output, const char* input)
    359         { return Converter<ToType, std::string>::convert(output, input); }
     361        { return Converter<ToType, std::string, Dummy>::convert(output, input); }
    360362    };
    361363#if 0
Note: See TracChangeset for help on using the changeset viewer.