https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81279

--- Comment #7 from Jason Vas Dias <jason.vas.dias at gmail dot com> ---
Created attachment 41665
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41665&action=edit
Fixed version - also demonstrates point : addresses of members increase

So when I mangle it to actually print each member's address in order,
whenever the tuple is printed :

        std::ostream &tuple::operator <<(std::ostream &out) const
        {
          std::cerr << " out: @ :" 
          << (static_cast<const void*>
              (reinterpret_cast<const _Head *>(this)))
          << std::endl;
          return _t.operator<<( out << head() << " " );
        }       

$ ./tTuple < /tmp/t
 out: @ :0x7ffc6f93d410
one  out: @ :0x7ffc6f93d430
two  out: @ :0x7ffc6f93d450
three
 fun( one two three )
one
two
three

This would not be the case had std::tuple been used - the addresses would be
DECREASING .

But I am now able to use with no problems in C++14, C++17 under 7.1.0 . Thanks!

Reply via email to