Skip to content
Snippets Groups Projects
  • Atkins, Charles Vernon's avatar
    6b1f95af
    Added a ValueType trait to TypeInfo. · 6b1f95af
    Atkins, Charles Vernon authored
    This will allow for generic template functions that can deal with
    complex types using thier underlying value types.  So rather than have:
    
    template<T> T foo(const T&);
    template<T> T foo(const std::complex<T>&);
    
    to handle the case where an std::complex<float> should use a float
    return value, you can now use a single signature:
    
    template<T> TypeInfo<T>::ValueType foo(const T&);
    6b1f95af
    History
    Added a ValueType trait to TypeInfo.
    Atkins, Charles Vernon authored
    This will allow for generic template functions that can deal with
    complex types using thier underlying value types.  So rather than have:
    
    template<T> T foo(const T&);
    template<T> T foo(const std::complex<T>&);
    
    to handle the case where an std::complex<float> should use a float
    return value, you can now use a single signature:
    
    template<T> TypeInfo<T>::ValueType foo(const T&);
Code owners
Assign users and groups as approvers for specific file changes. Learn more.