Changeset 20314

Show
Ignore:
Timestamp:
06/21/07 15:02:13 (1 year ago)
Author:
patrick
Message:

We do not support Visual C++ 7.0 anymore, so we can (finally) remove the
workaround for a bug in that version of the compiler that required two
implementations of member template specialization for getProperty<T>().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/jackal/config/jccl/Config/ConfigElement.h

    r19729 r20314  
    176176   } 
    177177 
    178    // Specializations of getProperty<T> placed inline for Visual Studio 7. 
    179    // MIPSpro and GCC do not handle this.  They get out-of-line 
    180    // specializations, found below. 
    181 #if defined(_MSC_VER) && _MSC_VER == 1300 
    182    template<> 
    183    std::string getProperty<std::string>(const std::string& prop, int ind) const 
    184    { 
    185       std::string prop_string = getPropertyString(prop,ind); 
    186       return prop_string; 
    187    } 
    188  
    189    /** 
    190     * Specialization for booleans so that we can read "true" and "false" rather 
    191     * than "1" and "0". 
    192     */ 
    193    template<> 
    194    bool getProperty<bool>(const std::string& prop, int ind) const 
    195    { 
    196       return getProperty_bool(prop, ind); 
    197    } 
    198  
    199    template<> 
    200    ConfigElementPtr getProperty<ConfigElementPtr>(const std::string& prop, 
    201                                                   int ind) const 
    202    { 
    203       return getProperty_ElementPtr(prop, ind); 
    204    } 
    205 #endif /* defined(_MSC_VER) && _MSC_VER == 1300 */ 
    206  
    207178   /** 
    208179    * Gets value that defaults to property 0. 
     
    213184    *       index within the std::string and ConfigElementPtr specializations. 
    214185    */ 
    215 #if defined(_MSC_VER) && _MSC_VER == 1300 
    216    template<class T> 
    217    T getProperty(const std::string& prop) const 
    218    { 
    219       return getProperty<T>(prop, 0); 
    220    } 
    221 #else 
    222186   template<class T> 
    223187   T getProperty(const std::string& prop) const; 
    224 #endif 
    225188 
    226189   /** 
     
    326289}; 
    327290 
    328 #if ! defined(_MSC_VER) || _MSC_VER > 1300 
    329291template<> 
    330292inline std::string ConfigElement::getProperty<std::string>(const std::string& prop, int ind) const 
     
    359321   return getProperty<T>(prop, 0); 
    360322} 
    361 #endif /* ! defined(_MSC_VER) || _MSC_VER > 1300 */ 
    362323 
    363324} // namespace jccl