Changeset 66651


Ignore:
Timestamp:
Nov 20, 2010, 12:48:33 AM (7 years ago)
Author:
Marshall Clow
Message:

SunPro? workaround; references #4757

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/array.hpp

    r66154 r66651  
    347347    }
    348348
    349 #if 0
    350         // Specific for boost::array: simply returns its elems data member.
    351     template <typename T, std::size_t N>
    352     T(&get_c_array(boost::array<T,N>& arg))[N]
    353     {
    354         return arg.elems;
    355     }
    356    
    357     // Const version.
    358     template <typename T, std::size_t N>
    359     const T(&get_c_array(const boost::array<T,N>& arg))[N]
    360     {
    361         return arg.elems;
    362     }
    363 #else
     349#if defined(__SUNPRO_CC)
     350//      Trac ticket #4757; the Sun Solaris compiler can't handle
     351//      syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
     352//     
     353//      We can't just use this for all compilers, because the
     354//              borland compilers can't handle this form.
    364355        namespace detail {
    365356       template <typename T, std::size_t N> struct c_array
     
    382373       return arg.elems;
    383374   }
     375#else
     376// Specific for boost::array: simply returns its elems data member.
     377    template <typename T, std::size_t N>
     378    T(&get_c_array(boost::array<T,N>& arg))[N]
     379    {
     380        return arg.elems;
     381    }
     382   
     383    // Const version.
     384    template <typename T, std::size_t N>
     385    const T(&get_c_array(const boost::array<T,N>& arg))[N]
     386    {
     387        return arg.elems;
     388    }
    384389#endif
    385390       
Note: See TracChangeset for help on using the changeset viewer.