This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/46507] std::tuple missed optimization
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Nov 2010 19:04:48 +0000
- Subject: [Bug tree-optimization/46507] std::tuple missed optimization
- Auto-submitted: auto-generated
- References: <bug-46507-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46507
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo.carlini at oracle dot
| |com
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-11-16 19:04:37 UTC ---
Interesting. Not that I think it would make a huge difference, but probably
this is a more "fair" comparison:
#include <tuple>
#include <utility>
struct A
{
virtual void f () const;
};
void arg_tuple_test (const std::tuple<A,A> &t)
{
std::get<0>(t).f ();
}
void extern_tuple_test ()
{
extern const std::tuple<A, A> &t;
std::get<0>(t).f ();
}
void arg_pair_test (const std::pair<A,A> &t)
{
std::get<0>(t).f ();
}