views:

194

answers:

2

I know Visual Studio 2010's standard library has been rewritten to support rvalue references, which boosts its performance considerably.

Does the standard library implementation of gcc 4.4 (and above) support rvalue references?

A: 

GCC supports rvalue references. Unfortunately, the libstc++ page doesn't say if the library implementation takes advantage of that.

Max Lybbert
+4  A: 

I found this from the STL of gcc 4.4 :

#ifdef __GXX_EXPERIMENTAL_CXX0X__
  _Vector_base(_Vector_base&& __x)
  : _M_impl(__x._M_get_Tp_allocator())
  {
    this->_M_impl._M_start = __x._M_impl._M_start;
    this->_M_impl._M_finish = __x._M_impl._M_finish;
    this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage;
    __x._M_impl._M_start = 0;
    __x._M_impl._M_finish = 0;
    __x._M_impl._M_end_of_storage = 0;
  }
#endif
hpsMouse