This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: change return type of non-standard vector::data() extension in C++03 mode


Our std::vector defines data() in C++98/C++03 mode, as a non-standard
extension:

#if __cplusplus >= 201103L
     _Tp*
#else
     pointer
#endif
     data() _GLIBCXX_NOEXCEPT
     { return _M_data_ptr(this->_M_impl._M_start); }

#if __cplusplus >= 201103L
     const _Tp*
#else
     const_pointer
#endif
     data() const _GLIBCXX_NOEXCEPT
     { return _M_data_ptr(this->_M_impl._M_start); }

We should either be using abi_tag to give the functions different
symbols, or just change the pre-C++11 signatures to match the standard
signatures.

Any objections to changing the return type?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]