<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-1162</id>
	<title>Nabble - gcc - libstdc++</title>
	<updated>2009-12-08T00:38:05Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/gcc---libstdc++-f1162.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/gcc---libstdc%2B%2B-f1162.html" />
	<subtitle type="html">Discussion and development list for the standard C++ library (libstdc++-v3). Patches to libstdc++-v3 should be sent to both this list and gcc-patches.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26690407</id>
	<title>Re: Bug in GCC 4.5 c++0x version of std::list&lt;T&gt;::merge(&amp;&amp;)?</title>
	<published>2009-12-08T00:38:05Z</published>
	<updated>2009-12-08T00:38:05Z</updated>
	<author>
		<name>Jonathan Wakely-4</name>
	</author>
	<content type="html">2009/12/8 Jonathan Wakely:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 2009/12/8 Benjamin Redelings I:
&lt;br&gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; I've CC'd the libstdc++ list, please reply there instead of the gcc list.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; It seems that many current uses of list&amp;lt;T&amp;gt;::merge( ) fail to compile with
&lt;br&gt;&amp;gt;&amp;gt; -std=c++0x, but I don't see a bug in bugzilla for this.  Itseems to result
&lt;br&gt;&amp;gt;&amp;gt; from:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; list&amp;lt;_Tp, _Alloc&amp;gt;::
&lt;br&gt;&amp;gt;&amp;gt; #ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;gt;&amp;gt; merge(list&amp;&amp; __x)
&lt;br&gt;&amp;gt;&amp;gt; #else
&lt;br&gt;&amp;gt;&amp;gt; merge(list&amp; __x)
&lt;br&gt;&amp;gt;&amp;gt; #endif
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; For c++0x, don't we need BOTH versions, since lvalues no longer bind to
&lt;br&gt;&amp;gt;&amp;gt; rvalue references, or am I missing something?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The WP only has:
&lt;br&gt;&amp;gt; void merge(list&amp;lt;T,Allocator&amp;gt;&amp;&amp; x);
&lt;br&gt;&amp;gt; template &amp;lt;class Compare&amp;gt; void merge(list&amp;lt;T,Allocator&amp;gt;&amp;&amp; x, Compare comp);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; See &lt;a href=&quot;http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1133&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1133&lt;/a&gt;&lt;br&gt;&amp;gt; which covers a similar issue with splice.
&lt;/div&gt;&lt;br&gt;I've requested that overloads of list::merge be added as well, watch
&lt;br&gt;that issue to see the outcome.
&lt;br&gt;&lt;br&gt;Jonathan
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-in-GCC-4.5-c%2B%2B0x-version-of-std%3A%3Alist%3CT%3E%3A%3Amerge%28--%29--tp26690297p26690407.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26690297</id>
	<title>Re: Bug in GCC 4.5 c++0x version of std::list&lt;T&gt;::merge(&amp;&amp;)?</title>
	<published>2009-12-08T00:26:42Z</published>
	<updated>2009-12-08T00:26:42Z</updated>
	<author>
		<name>Jonathan Wakely-4</name>
	</author>
	<content type="html">2009/12/8 Benjamin Redelings I:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;I've CC'd the libstdc++ list, please reply there instead of the gcc list.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; It seems that many current uses of list&amp;lt;T&amp;gt;::merge( ) fail to compile with
&lt;br&gt;&amp;gt; -std=c++0x, but I don't see a bug in bugzilla for this.  Itseems to result
&lt;br&gt;&amp;gt; from:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; list&amp;lt;_Tp, _Alloc&amp;gt;::
&lt;br&gt;&amp;gt; #ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;gt; merge(list&amp;&amp; __x)
&lt;br&gt;&amp;gt; #else
&lt;br&gt;&amp;gt; merge(list&amp; __x)
&lt;br&gt;&amp;gt; #endif
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For c++0x, don't we need BOTH versions, since lvalues no longer bind to
&lt;br&gt;&amp;gt; rvalue references, or am I missing something?
&lt;/div&gt;&lt;br&gt;The WP only has:
&lt;br&gt;void merge(list&amp;lt;T,Allocator&amp;gt;&amp;&amp; x);
&lt;br&gt;template &amp;lt;class Compare&amp;gt; void merge(list&amp;lt;T,Allocator&amp;gt;&amp;&amp; x, Compare comp);
&lt;br&gt;&lt;br&gt;See &lt;a href=&quot;http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1133&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1133&lt;/a&gt;&lt;br&gt;which covers a similar issue with splice.
&lt;br&gt;&lt;br&gt;Jonathan
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-in-GCC-4.5-c%2B%2B0x-version-of-std%3A%3Alist%3CT%3E%3A%3Amerge%28--%29--tp26690297p26690297.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26685192</id>
	<title>Re: [profile-stdlib] PATCH: Add three diagnostics and implement cost  	factor parameterization</title>
	<published>2009-12-07T14:15:08Z</published>
	<updated>2009-12-07T14:15:08Z</updated>
	<author>
		<name>Silvius Rus</name>
	</author>
	<content type="html">On Sun, Dec 6, 2009 at 7:38 PM, Changhee Jung &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26685192&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;haemil99@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Hello libstdc++ maintainers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Hello maintainers,
&lt;br&gt;&lt;br&gt;Can this still make it to 4.5, given that it affects only the profile
&lt;br&gt;mode? &amp;nbsp;If so, could you review it as a patch to trunk instead of
&lt;br&gt;branch? &amp;nbsp;There are no other changes on the profile-stdlib branch since
&lt;br&gt;the last merge to trunk, except for very minor fixes.
&lt;br&gt;&lt;br&gt;Thank you,
&lt;br&gt;Silvius
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The attached patch implements the following in the profile-stdlib branch:
&lt;br&gt;&amp;gt; 1) New diagnostics
&lt;br&gt;&amp;gt;  - list-to-vector; if data is inserted at the end of the list and
&lt;br&gt;&amp;gt; iteration operation is common, vector is better.
&lt;br&gt;&amp;gt;  - list-to-slist; slist is more likely to fit in a cache line due to
&lt;br&gt;&amp;gt; less memory usage.
&lt;br&gt;&amp;gt;  - list-to-set; if a find operation, 'std::find', is frequently used
&lt;br&gt;&amp;gt; in the list, set is better.
&lt;br&gt;&amp;gt; 2) Cost factor parameterization; constant factors of the cost models
&lt;br&gt;&amp;gt; for diagnostics can be read from a file, &amp;quot;libstdcxx-profile.conf&amp;quot; or
&lt;br&gt;&amp;gt; environment variables.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There is an issue related to thel instrumentation of 'std::find'.
&lt;br&gt;&amp;gt; It seems that 'bits/stl_algo.h' was modified for the parallel mode so
&lt;br&gt;&amp;gt; that its functions declared in the namespace of '_GLIBCXX_STD_P' can
&lt;br&gt;&amp;gt; be used instead of original functions in the release mode.
&lt;br&gt;&amp;gt; Currently, I did the same thing, conditional compilation stuff, to
&lt;br&gt;&amp;gt; hide the original 'find' function under its wrapper function.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This inevitably causes a modification to the original 'bits/stl_algo.h'.
&lt;br&gt;&amp;gt; Alternatively, it is possible to duplicate the 'bits/stl_algo.h' in
&lt;br&gt;&amp;gt; 'profile/stl_algo.h' and modify the copy to avoid any intrusion from
&lt;br&gt;&amp;gt; the profile mode to the release mode.
&lt;br&gt;&amp;gt; It would be appreciated if you come up with a better idea to deal with this.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thank you,
&lt;br&gt;&amp;gt; Changhee
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-profile-stdlib--PATCH%3A-Add-three-diagnostics-and-implement-cost--%09factor-parameterization-tp26672081p26685192.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26678030</id>
	<title>[v3] Fix libstdc++/42319</title>
	<published>2009-12-07T06:29:38Z</published>
	<updated>2009-12-07T06:29:38Z</updated>
	<author>
		<name>Paolo Carlini-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;tested x86_64-linux, committed to mainline.
&lt;br&gt;&lt;br&gt;Paolo.
&lt;br&gt;&lt;br&gt;////////////////////
&lt;br&gt;&lt;br /&gt;2009-12-07 &amp;nbsp;Paolo Carlini &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26678030&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;paolo.carlini@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PR libstdc++/42319
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/parallel/losertree.h: Include bits/stl_function.h instead
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; of the whole &amp;lt;functional&amp;gt;.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/parallel/base.h: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/parallel/numeric: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/parallel/balanced_quicksort.h: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/parallel/checkers.h: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/17_intro/headers/c++200x/42319.cc: New.
&lt;br&gt;&lt;br /&gt;Index: include/parallel/losertree.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/parallel/losertree.h	(revision 155034)
&lt;br&gt;+++ include/parallel/losertree.h	(working copy)
&lt;br&gt;@@ -32,9 +32,8 @@
&lt;br&gt;&amp;nbsp;#ifndef _GLIBCXX_PARALLEL_LOSERTREE_H
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PARALLEL_LOSERTREE_H 1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-#include &amp;lt;functional&amp;gt;
&lt;br&gt;-
&lt;br&gt;&amp;nbsp;#include &amp;lt;bits/stl_algobase.h&amp;gt;
&lt;br&gt;+#include &amp;lt;bits/stl_function.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/features.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/base.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Index: include/parallel/base.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/parallel/base.h	(revision 155034)
&lt;br&gt;+++ include/parallel/base.h	(working copy)
&lt;br&gt;@@ -32,13 +32,13 @@
&lt;br&gt;&amp;nbsp;#ifndef _GLIBCXX_PARALLEL_BASE_H
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PARALLEL_BASE_H 1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;bits/c++config.h&amp;gt;
&lt;br&gt;+#include &amp;lt;bits/stl_function.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;omp.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/features.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/basic_iterator.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/parallel.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-
&lt;br&gt;&amp;nbsp;// Parallel mode namespaces.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/**
&lt;br&gt;Index: include/parallel/numeric
&lt;br&gt;===================================================================
&lt;br&gt;--- include/parallel/numeric	(revision 155034)
&lt;br&gt;+++ include/parallel/numeric	(working copy)
&lt;br&gt;@@ -39,7 +39,7 @@
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PARALLEL_NUMERIC_H 1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;numeric&amp;gt;
&lt;br&gt;-#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;bits/stl_function.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/numericfwd.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/iterator.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/for_each.h&amp;gt;
&lt;br&gt;Index: include/parallel/balanced_quicksort.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/parallel/balanced_quicksort.h	(revision 155034)
&lt;br&gt;+++ include/parallel/balanced_quicksort.h	(working copy)
&lt;br&gt;@@ -44,12 +44,12 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/basic_iterator.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;bits/stl_algo.h&amp;gt;
&lt;br&gt;+#include &amp;lt;bits/stl_function.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/settings.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/partition.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/random_number.h&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/queue.h&amp;gt;
&lt;br&gt;-#include &amp;lt;functional&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#if _GLIBCXX_ASSERTIONS
&lt;br&gt;&amp;nbsp;#include &amp;lt;parallel/checkers.h&amp;gt;
&lt;br&gt;Index: include/parallel/checkers.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/parallel/checkers.h	(revision 155034)
&lt;br&gt;+++ include/parallel/checkers.h	(working copy)
&lt;br&gt;@@ -32,9 +32,9 @@
&lt;br&gt;&amp;nbsp;#ifndef _GLIBCXX_PARALLEL_CHECKERS_H
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PARALLEL_CHECKERS_H 1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-#include &amp;lt;functional&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;cstdio&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;bits/stl_algobase.h&amp;gt;
&lt;br&gt;+#include &amp;lt;bits/stl_function.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;namespace __gnu_parallel
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;Index: testsuite/17_intro/headers/c++200x/42319.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/17_intro/headers/c++200x/42319.cc	(revision 0)
&lt;br&gt;+++ testsuite/17_intro/headers/c++200x/42319.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,22 @@
&lt;br&gt;+// { dg-do compile }
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// libstdc++/42319
&lt;br&gt;+#include &amp;lt;bits/char_traits.h&amp;gt;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-v3--Fix-libstdc%2B%2B-42319-tp26678030p26678030.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26673966</id>
	<title>Re: [profile-stdlib] PATCH: Add three diagnostics and implement cost  	factor parameterization</title>
	<published>2009-12-07T00:18:33Z</published>
	<updated>2009-12-07T00:18:33Z</updated>
	<author>
		<name>Jonathan Wakely-4</name>
	</author>
	<content type="html">Hi Changee,
&lt;br&gt;&lt;br&gt;Some initial comments, I'll take another look later.
&lt;br&gt;&lt;br&gt;I noticed a few formatting issues in
&lt;br&gt;libstdc++-v3/include/profile/iterator_tracker.h - overlong lines, and
&lt;br&gt;&amp;quot;public:&amp;quot; indented incorrectly.
&lt;br&gt;&lt;br&gt;The doxygen comment for profile/algorithm says:
&lt;br&gt;/** @file parallel/algorithm
&lt;br&gt;&lt;br&gt;This include guard is not in the correct format:
&lt;br&gt;#ifndef PROFCXX_PROFILER_LIST_TO_SLIST_H
&lt;br&gt;That could clash with a user header (I don't like the format used by
&lt;br&gt;the other profile headers, with two trailing underscores, but that
&lt;br&gt;seems to be the form used consistently.)
&lt;br&gt;&lt;br&gt;This is wrong:
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;swap(vector&amp;&amp; __x)
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;swap(vector&amp; __x)
&lt;br&gt;+#endif
&lt;br&gt;&lt;br&gt;vector::swap() does not work with rvalues now, the same goes for
&lt;br&gt;&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Tp, typename _Alloc&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;swap(vector&amp;lt;_Tp, _Alloc&amp;gt;&amp;&amp; __lhs, vector&amp;lt;_Tp, _Alloc&amp;gt;&amp; __rhs)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ __lhs.swap(__rhs); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Tp, typename _Alloc&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;swap(vector&amp;lt;_Tp, _Alloc&amp;gt;&amp; __lhs, vector&amp;lt;_Tp, _Alloc&amp;gt;&amp;&amp; __rhs)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ __lhs.swap(__rhs); }
&lt;br&gt;+#endif
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Jonathan
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-profile-stdlib--PATCH%3A-Add-three-diagnostics-and-implement-cost--%09factor-parameterization-tp26672081p26673966.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26672081</id>
	<title>[profile-stdlib] PATCH: Add three diagnostics and implement cost  	factor parameterization</title>
	<published>2009-12-06T19:38:29Z</published>
	<updated>2009-12-06T19:38:29Z</updated>
	<author>
		<name>Changhee Jung</name>
	</author>
	<content type="html">Hello libstdc++ maintainers,
&lt;br&gt;&lt;br&gt;The attached patch implements the following in the profile-stdlib branch:
&lt;br&gt;1) New diagnostics
&lt;br&gt;&amp;nbsp; - list-to-vector; if data is inserted at the end of the list and
&lt;br&gt;iteration operation is common, vector is better.
&lt;br&gt;&amp;nbsp; - list-to-slist; slist is more likely to fit in a cache line due to
&lt;br&gt;less memory usage.
&lt;br&gt;&amp;nbsp; - list-to-set; if a find operation, 'std::find', is frequently used
&lt;br&gt;in the list, set is better.
&lt;br&gt;2) Cost factor parameterization; constant factors of the cost models
&lt;br&gt;for diagnostics can be read from a file, &amp;quot;libstdcxx-profile.conf&amp;quot; or
&lt;br&gt;environment variables.
&lt;br&gt;&lt;br&gt;There is an issue related to thel instrumentation of 'std::find'.
&lt;br&gt;It seems that 'bits/stl_algo.h' was modified for the parallel mode so
&lt;br&gt;that its functions declared in the namespace of '_GLIBCXX_STD_P' can
&lt;br&gt;be used instead of original functions in the release mode.
&lt;br&gt;Currently, I did the same thing, conditional compilation stuff, to
&lt;br&gt;hide the original 'find' function under its wrapper function.
&lt;br&gt;&lt;br&gt;This inevitably causes a modification to the original 'bits/stl_algo.h'.
&lt;br&gt;Alternatively, it is possible to duplicate the 'bits/stl_algo.h' in
&lt;br&gt;'profile/stl_algo.h' and modify the copy to avoid any intrusion from
&lt;br&gt;the profile mode to the release mode.
&lt;br&gt;It would be appreciated if you come up with a better idea to deal with this.
&lt;br&gt;&lt;br&gt;Thank you,
&lt;br&gt;Changhee
&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[profile-stdlib-20091206.patch]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;Index: libstdc++-v3/include/Makefile.in
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/Makefile.in	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/Makefile.in	(working copy)
&lt;br&gt;@@ -1014,6 +1014,9 @@
&lt;br&gt;&amp;nbsp;profile_srcdir = ${glibcxx_srcdir}/include/profile
&lt;br&gt;&amp;nbsp;profile_builddir = ./profile
&lt;br&gt;&amp;nbsp;profile_headers = \
&lt;br&gt;+	${profile_srcdir}/algo.h \
&lt;br&gt;+	${profile_srcdir}/algorithm \
&lt;br&gt;+	${profile_srcdir}/iterator_tracker.h \
&lt;br&gt;&amp;nbsp;	${profile_srcdir}/base.h \
&lt;br&gt;&amp;nbsp;	${profile_srcdir}/unordered_map \
&lt;br&gt;&amp;nbsp;	${profile_srcdir}/unordered_set \
&lt;br&gt;@@ -1041,7 +1044,10 @@
&lt;br&gt;&amp;nbsp;	${profile_impl_srcdir}/profiler_state.h \
&lt;br&gt;&amp;nbsp;	${profile_impl_srcdir}/profiler_trace.h \
&lt;br&gt;&amp;nbsp;	${profile_impl_srcdir}/profiler_vector_size.h \
&lt;br&gt;-	${profile_impl_srcdir}/profiler_vector_to_list.h
&lt;br&gt;+	${profile_impl_srcdir}/profiler_vector_to_list.h \
&lt;br&gt;+	${profile_impl_srcdir}/profiler_list_to_slist.h \
&lt;br&gt;+	${profile_impl_srcdir}/profiler_list_to_vector.h \
&lt;br&gt;+	${profile_impl_srcdir}/profiler_list_to_set.h 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;@GLIBCXX_C_HEADERS_EXTRA_FALSE@c_base_headers_extra = 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Index: libstdc++-v3/include/std/algorithm
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/std/algorithm	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/std/algorithm	(working copy)
&lt;br&gt;@@ -65,4 +65,8 @@
&lt;br&gt;&amp;nbsp;# include &amp;lt;parallel/algorithm&amp;gt;
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#ifdef _GLIBCXX_PROFILE
&lt;br&gt;+# include &amp;lt;profile/algorithm&amp;gt;
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;#endif /* _GLIBCXX_ALGORITHM */
&lt;br&gt;Index: libstdc++-v3/include/profile/algorithm
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/algorithm	(revision 0)
&lt;br&gt;+++ libstdc++-v3/include/profile/algorithm	(revision 0)
&lt;br&gt;@@ -0,0 +1,38 @@
&lt;br&gt;+// Algorithm extensions -*- C++ -*-
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009
&lt;br&gt;+// Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// Under Section 7 of GPL version 3, you are granted additional
&lt;br&gt;+// permissions described in the GCC Runtime Library Exception, version
&lt;br&gt;+// 3.1, as published by the Free Software Foundation.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License and
&lt;br&gt;+// a copy of the GCC Runtime Library Exception along with this program;
&lt;br&gt;+// see the files COPYING3 and COPYING.RUNTIME respectively. &amp;nbsp;If not, see
&lt;br&gt;+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+/** @file parallel/algorithm
&lt;br&gt;+ * &amp;nbsp;This file is a GNU extension to the Standard C++ Library.
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+#ifndef _PROFILE_ALGORITHM
&lt;br&gt;+#define _PROFILE_ALGORITHM 1
&lt;br&gt;+
&lt;br&gt;+#pragma GCC system_header
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;algorithm&amp;gt;
&lt;br&gt;+#include &amp;lt;profile/algo.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+#endif
&lt;br&gt;Index: libstdc++-v3/include/profile/iterator_tracker.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/iterator_tracker.h	(revision 0)
&lt;br&gt;+++ libstdc++-v3/include/profile/iterator_tracker.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,271 @@
&lt;br&gt;+#ifndef _GLIBCXX_ITERATOR_TRACKER
&lt;br&gt;+#define _GLIBCXX_ITERATOR_TRACKER 1
&lt;br&gt;+
&lt;br&gt;+namespace std
&lt;br&gt;+{
&lt;br&gt;+namespace __profile
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+class __iterator_tracker 
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;typedef __iterator_tracker _Self;
&lt;br&gt;+ &amp;nbsp;// The underlying iterator
&lt;br&gt;+ &amp;nbsp;_Iterator _M_current;
&lt;br&gt;+ &amp;nbsp;// The underlying data structure
&lt;br&gt;+ &amp;nbsp;const _Sequence* _M_ds;
&lt;br&gt;+ &amp;nbsp;typedef std::iterator_traits&amp;lt;_Iterator&amp;gt; _Traits;
&lt;br&gt;+
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;typedef _Iterator		 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base_iterator;
&lt;br&gt;+ &amp;nbsp;typedef typename _Traits::iterator_category iterator_category; 
&lt;br&gt;+ &amp;nbsp;typedef typename _Traits::value_type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value_type;
&lt;br&gt;+ &amp;nbsp;typedef typename _Traits::difference_type &amp;nbsp; difference_type;
&lt;br&gt;+ &amp;nbsp;typedef typename _Traits::reference &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reference;
&lt;br&gt;+ &amp;nbsp;typedef typename _Traits::pointer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pointer;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker() : _M_current(), _M_ds(0) { }
&lt;br&gt;+ &amp;nbsp;__iterator_tracker(const _Iterator&amp; __i, const _Sequence* seq) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _M_current(__i), _M_ds(seq) { }
&lt;br&gt;+ &amp;nbsp;__iterator_tracker(const __iterator_tracker&amp; __x) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _M_current(__x._M_current), _M_ds(__x._M_ds) { }
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _MutableIterator&amp;gt;
&lt;br&gt;+ &amp;nbsp;__iterator_tracker(const __iterator_tracker&amp;lt;_MutableIterator, typename __gnu_cxx::__enable_if&amp;lt;(std::__are_same&amp;lt;_MutableIterator, typename _Sequence::iterator::_Base_iterator&amp;gt;::__value), _Sequence&amp;gt;::__type&amp;gt;&amp; __x)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: &amp;nbsp;_M_current(__x.base()), _M_ds(__x._M_get_sequence()) { }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;_Iterator
&lt;br&gt;+ &amp;nbsp;base() const { return _M_current; }
&lt;br&gt;+ &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; * @brief Conversion to underlying non-debug iterator to allow
&lt;br&gt;+ &amp;nbsp; * better interaction with non-profile containers.
&lt;br&gt;+ &amp;nbsp; */
&lt;br&gt;+ &amp;nbsp;operator _Iterator() const { return _M_current; }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;pointer
&lt;br&gt;+ &amp;nbsp;operator-&amp;gt;() const { return &amp;*_M_current; }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator++()
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_ds-&amp;gt;_M_profile_iterate();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;++_M_current;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator++(int)
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_ds-&amp;gt;_M_profile_iterate();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__iterator_tracker __tmp(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;++_M_current;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return __tmp;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator--()
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_ds-&amp;gt;_M_profile_iterate(1);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;--_M_current;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator--(int)
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_ds-&amp;gt;_M_profile_iterate(1);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__iterator_tracker __tmp(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;--_M_current;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return __tmp;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator=(const __iterator_tracker&amp; __x)
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_current = __x._M_current;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;reference
&lt;br&gt;+ &amp;nbsp;operator*() const
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return *_M_current;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ // ------ Random access iterator requirements ------
&lt;br&gt;+ &amp;nbsp;reference
&lt;br&gt;+ &amp;nbsp;operator[](const difference_type&amp; __n) const 
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return _M_current[__n];
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator+=(const difference_type&amp; __n)
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_current += __n;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker
&lt;br&gt;+ &amp;nbsp;operator+(const difference_type&amp; __n) const
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__iterator_tracker __tmp(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tmp += __n;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return __tmp;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker&amp;
&lt;br&gt;+ &amp;nbsp;operator-=(const difference_type&amp; __n)
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_current += -__n;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__iterator_tracker
&lt;br&gt;+ &amp;nbsp;operator-(const difference_type&amp; __n) const
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__iterator_tracker __tmp(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tmp -= __n;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return __tmp;
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;void
&lt;br&gt;+ &amp;nbsp;_M_find()
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;_M_ds-&amp;gt;_M_profile_find();
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;const _Sequence*
&lt;br&gt;+ &amp;nbsp;_M_get_sequence() const
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return static_cast&amp;lt;const _Sequence*&amp;gt;(_M_ds);
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator==(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() == __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator==(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() == __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator!=(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() != __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator!=(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() != __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;lt;(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;lt; __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;lt;(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;lt; __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;lt;=(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;lt;= __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;lt;=(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;lt;= __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;gt;(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;gt; __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;gt;(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;gt; __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;gt;=(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;gt;= __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline bool
&lt;br&gt;+operator&amp;gt;=(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() &amp;gt;= __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+// _GLIBCXX_RESOLVE_LIB_DEFECTS
&lt;br&gt;+// According to the resolution of DR179 not only the various comparison
&lt;br&gt;+// operators but also operator- must accept mixed iterator/const_iterator
&lt;br&gt;+// parameters.
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _IteratorL, typename _IteratorR, typename _Sequence&amp;gt;
&lt;br&gt;+ &amp;nbsp;inline typename __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;::difference_type
&lt;br&gt;+ &amp;nbsp;operator-(const __iterator_tracker&amp;lt;_IteratorL, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_IteratorR, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() - __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline typename __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;::difference_type
&lt;br&gt;+operator-(const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __lhs,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __rhs)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __lhs.base() - __rhs.base();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+template&amp;lt;typename _Iterator, typename _Sequence&amp;gt;
&lt;br&gt;+inline __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;
&lt;br&gt;+operator+(typename __iterator_tracker&amp;lt;_Iterator,_Sequence&amp;gt;::difference_type
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__n,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const __iterator_tracker&amp;lt;_Iterator, _Sequence&amp;gt;&amp; __i)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __i + __n;
&lt;br&gt;+}
&lt;br&gt;+		
&lt;br&gt;+} &amp;nbsp;// namespace __profile
&lt;br&gt;+} &amp;nbsp;// namespace std
&lt;br&gt;+#endif &amp;nbsp;
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler_list_to_set.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler_list_to_set.h	(revision 0)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler_list_to_set.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,283 @@
&lt;br&gt;+// -*- C++ -*-
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2008 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the terms
&lt;br&gt;+// of the GNU General Public License as published by the Free Software
&lt;br&gt;+// Foundation; either version 2, or (at your option) any later
&lt;br&gt;+// version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful, but
&lt;br&gt;+// WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+// General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License
&lt;br&gt;+// along with this library; see the file COPYING. &amp;nbsp;If not, write to
&lt;br&gt;+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
&lt;br&gt;+// MA 02111-1307, USA.
&lt;br&gt;+
&lt;br&gt;+// As a special exception, you may use this file as part of a free
&lt;br&gt;+// software library without restriction. &amp;nbsp;Specifically, if other files
&lt;br&gt;+// instantiate templates or use macros or inline functions from this
&lt;br&gt;+// file, or you compile this file and link it with other files to
&lt;br&gt;+// produce an executable, this file does not by itself cause the
&lt;br&gt;+// resulting executable to be covered by the GNU General Public
&lt;br&gt;+// License. &amp;nbsp;This exception does not however invalidate any other
&lt;br&gt;+// reasons why the executable file might be covered by the GNU General
&lt;br&gt;+// Public License.
&lt;br&gt;+
&lt;br&gt;+/** @file profile/impl/profiler_list_to_set.h
&lt;br&gt;+ * &amp;nbsp;@brief diagnostics for list to set.
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+// Written by Changhee Jung.
&lt;br&gt;+
&lt;br&gt;+#ifndef PROFCXX_PROFILER_LIST_TO_SET_H__
&lt;br&gt;+#define PROFCXX_PROFILER_LIST_TO_SET_H__ 1
&lt;br&gt;+
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+#include &amp;lt;cstdio&amp;gt;
&lt;br&gt;+#include &amp;lt;cstdlib&amp;gt;
&lt;br&gt;+#include &amp;lt;cstring&amp;gt;
&lt;br&gt;+#else
&lt;br&gt;+#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;+#include &amp;lt;stdint.h&amp;gt;
&lt;br&gt;+#include &amp;lt;string.h&amp;gt;
&lt;br&gt;+#endif
&lt;br&gt;+#include &amp;lt;string&amp;gt;
&lt;br&gt;+#include &amp;lt;sstream&amp;gt;
&lt;br&gt;+#include &amp;lt;math.h&amp;gt;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_node.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_trace.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;+static inline int __log2(size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;for (int __bit_count = sizeof(size_t) - 1; __bit_count &amp;gt;= 0; --__bit_count) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;if ((2 &amp;lt;&amp;lt; __bit_count) &amp; __size) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;return __bit_count;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+namespace __cxxprof_impl
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+inline float __set_insert_cost(size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __tables&amp;lt;0&amp;gt;::__set_insert_cost_factor * static_cast&amp;lt;float&amp;gt;(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__log2(__size));
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline float __set_find_cost(size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __tables&amp;lt;0&amp;gt;::__set_find_cost_factor * static_cast&amp;lt;float&amp;gt;(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__log2(__size));
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+/** @brief A list-to-set instrumentation line in the object table. &amp;nbsp;*/
&lt;br&gt;+class __list2set_info: public __object_info_base
&lt;br&gt;+{
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__list2set_info()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _M_insert(0), _M_find(0), _M_list_cost(0.0),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; _M_set_cost(0.0), _M_valid(true) &amp;nbsp;{}
&lt;br&gt;+ &amp;nbsp;__list2set_info(__stack_t __stack)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: __object_info_base(__stack), _M_insert(0), _M_find(0),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _M_list_cost(0.0), _M_set_cost(0.0), _M_valid(true) {} 
&lt;br&gt;+ &amp;nbsp;virtual ~__list2set_info() {}
&lt;br&gt;+ &amp;nbsp;__list2set_info(const __list2set_info&amp; __o);
&lt;br&gt;+ &amp;nbsp;void __merge(const __list2set_info&amp; __o);
&lt;br&gt;+ &amp;nbsp;void __write(FILE* __f) const;
&lt;br&gt;+ &amp;nbsp;float __magnitude() const { return _M_list_cost - _M_set_cost; }
&lt;br&gt;+ &amp;nbsp;const char* __advice() const { return &amp;quot;change std::list to std::set&amp;quot;; }
&lt;br&gt;+ &amp;nbsp;float __list_cost() { return _M_list_cost; }
&lt;br&gt;+ &amp;nbsp;void __set_list_cost(float __lc) { _M_list_cost = __lc; }
&lt;br&gt;+ &amp;nbsp;void __set_set_cost(float __vc) { _M_set_cost = __vc; }
&lt;br&gt;+ &amp;nbsp;bool __is_valid() { return _M_valid; }
&lt;br&gt;+ &amp;nbsp;void __set_invalid() { _M_valid = false; }
&lt;br&gt;+ &amp;nbsp;void __opr_insert(size_t __size, size_t __count);
&lt;br&gt;+ &amp;nbsp;void __opr_find(size_t __size);
&lt;br&gt;+
&lt;br&gt;+private:
&lt;br&gt;+ &amp;nbsp;size_t _M_insert;
&lt;br&gt;+ &amp;nbsp;size_t _M_find;
&lt;br&gt;+ &amp;nbsp;float _M_list_cost;
&lt;br&gt;+ &amp;nbsp;float _M_set_cost;
&lt;br&gt;+ &amp;nbsp;bool &amp;nbsp;_M_valid;
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+inline __list2set_info::__list2set_info(const __list2set_info&amp; __o)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: __object_info_base(__o)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;_M_insert &amp;nbsp;= __o._M_insert;
&lt;br&gt;+ &amp;nbsp;_M_find &amp;nbsp;= __o._M_find;
&lt;br&gt;+ &amp;nbsp;_M_set_cost &amp;nbsp;= __o._M_set_cost;
&lt;br&gt;+ &amp;nbsp;_M_list_cost &amp;nbsp; &amp;nbsp;= __o._M_list_cost;
&lt;br&gt;+ &amp;nbsp;_M_valid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= __o._M_valid;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2set_info::__merge(const __list2set_info&amp; __o)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;_M_insert &amp;nbsp;+= __o._M_insert;
&lt;br&gt;+ &amp;nbsp;_M_find &amp;nbsp;+= __o._M_find;
&lt;br&gt;+ &amp;nbsp;_M_set_cost &amp;nbsp;+= __o._M_set_cost;
&lt;br&gt;+ &amp;nbsp;_M_list_cost &amp;nbsp; &amp;nbsp;+= __o._M_list_cost;
&lt;br&gt;+ &amp;nbsp;_M_valid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;= __o._M_valid;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2set_info::__opr_insert(size_t __size, size_t __count) 
&lt;br&gt;+{
&lt;br&gt;+	_M_insert += __count;
&lt;br&gt;+ 	_M_list_cost += __count * __tables&amp;lt;0&amp;gt;::__list_insert_cost;
&lt;br&gt;+ &amp;nbsp;_M_set_cost += __count * __set_insert_cost(__size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2set_info::__opr_find(size_t __size)
&lt;br&gt;+{
&lt;br&gt;+	_M_insert += 1;
&lt;br&gt;+	// Use avererage case complexity rathen than worst case one
&lt;br&gt;+ 	_M_list_cost += 3.0/4.0*__size * __tables&amp;lt;0&amp;gt;::__list_find_cost;
&lt;br&gt;+ &amp;nbsp;_M_set_cost += __set_find_cost(__size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+class __list2set_stack_info: public __list2set_info {
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__list2set_stack_info(const __list2set_info&amp; __o) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: __list2set_info(__o) {}
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+class __trace_list_to_set
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: public __trace_base&amp;lt;__list2set_info, __list2set_stack_info&amp;gt; 
&lt;br&gt;+{
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__trace_list_to_set();
&lt;br&gt;+ &amp;nbsp;~__trace_list_to_set() {}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Insert a new node at construct with object, callstack and initial size. 
&lt;br&gt;+ &amp;nbsp;void __insert(__object_t __obj, __stack_t __stack);
&lt;br&gt;+ &amp;nbsp;// Call at destruction/clean to set container final size.
&lt;br&gt;+ &amp;nbsp;void __destruct(const void* __obj);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Find the node in the live map.
&lt;br&gt;+ &amp;nbsp;__list2set_info* __find(const void* __obj);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Collect cost of operations.
&lt;br&gt;+ &amp;nbsp;void __opr_insert(const void* __obj, size_t __size, size_t __count);
&lt;br&gt;+ &amp;nbsp;void __invalid_operator(const void* __obj);
&lt;br&gt;+ &amp;nbsp;void __opr_find(const void* __obj, size_t __size);
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+inline __trace_list_to_set::__trace_list_to_set()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: __trace_base&amp;lt;__list2set_info, __list2set_stack_info&amp;gt;()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__id = &amp;quot;list-to-set&amp;quot;;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set::__insert(__object_t __obj,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __stack_t __stack)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__add_object(__obj, __list2set_info(__stack));
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2set_info::__write(FILE* __f) const
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;fprintf(__f, &amp;quot;%Zu %Zu %.0f %.0f %s\n&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_insert, _M_find, _M_list_cost, _M_set_cost,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_valid ? &amp;quot;valid&amp;quot; : &amp;quot;invalid&amp;quot;);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set::__destruct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__is_on())
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__list2set_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (!__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__retire_object(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set::__opr_insert(const void* __obj, size_t __size,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_t __count)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2set_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__opr_insert(__size, __count);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set::__invalid_operator(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2set_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__set_invalid();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set::__opr_find(const void* __obj, size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2set_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__opr_find(__size);
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+// Initialization and report.
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set_init()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set = new __trace_list_to_set();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set_report(FILE* __f, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __warning_vector_t&amp; __warnings)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (__tables&amp;lt;0&amp;gt;::_S_list_to_set) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set-&amp;gt;__collect_warnings(__warnings);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set-&amp;gt;__write(__f);
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+// Implementations of instrumentation hooks.
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set_construct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set-&amp;gt;__insert(__obj, __get_stack());
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set_destruct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set-&amp;gt;__destruct(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set_insert(const void* __obj, size_t __size,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __count = 1)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set-&amp;gt;__opr_insert(__obj, __size, __count);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_set_find(const void* __obj, size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_set-&amp;gt;__opr_find(__obj, __size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+} // namespace __cxxprof_impl
&lt;br&gt;+#endif /* PROFCXX_PROFILER_LIST_TO_SET_H__ */
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler_list_to_slist.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler_list_to_slist.h	(revision 0)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler_list_to_slist.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,190 @@
&lt;br&gt;+// -*- C++ -*-
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the terms
&lt;br&gt;+// of the GNU General Public License as published by the Free Software
&lt;br&gt;+// Foundation; either version 2, or (at your option) any later
&lt;br&gt;+// version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful, but
&lt;br&gt;+// WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+// General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License
&lt;br&gt;+// along with this library; see the file COPYING. &amp;nbsp;If not, write to
&lt;br&gt;+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
&lt;br&gt;+// MA 02111-1307, USA.
&lt;br&gt;+
&lt;br&gt;+// As a special exception, you may use this file as part of a free
&lt;br&gt;+// software library without restriction. &amp;nbsp;Specifically, if other files
&lt;br&gt;+// instantiate templates or use macros or inline functions from this
&lt;br&gt;+// file, or you compile this file and link it with other files to
&lt;br&gt;+// produce an executable, this file does not by itself cause the
&lt;br&gt;+// resulting executable to be covered by the GNU General Public
&lt;br&gt;+// License. &amp;nbsp;This exception does not however invalidate any other
&lt;br&gt;+// reasons why the executable file might be covered by the GNU General
&lt;br&gt;+// Public License.
&lt;br&gt;+
&lt;br&gt;+/** @file profile/impl/profiler_list_to_slist.h
&lt;br&gt;+ * &amp;nbsp;@brief Diagnostics for list to slist.
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+// Written by Changhee Jung.
&lt;br&gt;+
&lt;br&gt;+#ifndef PROFCXX_PROFILER_LIST_TO_SLIST_H
&lt;br&gt;+#define PROFCXX_PROFILER_LIST_TO_SLIST_H 1
&lt;br&gt;+
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+#include &amp;lt;cstdlib&amp;gt;
&lt;br&gt;+#include &amp;lt;cstdio&amp;gt;
&lt;br&gt;+#include &amp;lt;cstring&amp;gt;
&lt;br&gt;+#else
&lt;br&gt;+#include &amp;lt;stdlib.h&amp;gt;
&lt;br&gt;+#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;+#include &amp;lt;string.h&amp;gt;
&lt;br&gt;+#endif
&lt;br&gt;+#include &amp;quot;profile/impl/profiler.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_node.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_trace.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;+namespace __cxxprof_impl
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+class __list2slist_info: public __object_info_base
&lt;br&gt;+{
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__list2slist_info() : _M_rewind(false), _M_operations(0) {}
&lt;br&gt;+ &amp;nbsp;__list2slist_info(__stack_t __stack) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _M_rewind(false), _M_operations(0),__object_info_base(__stack) {}
&lt;br&gt;+ &amp;nbsp;virtual ~__list2slist_info() {}
&lt;br&gt;+ &amp;nbsp;__list2slist_info(const __list2slist_info&amp; __o) : __object_info_base(__o)
&lt;br&gt;+ &amp;nbsp;{ _M_rewind = __o._M_rewind; _M_operations = __o._M_operations; }
&lt;br&gt;+ &amp;nbsp;// XXX: the magnitude should be multiplied with a constant factor F,
&lt;br&gt;+ &amp;nbsp;// where F is 1 when the malloc size class of list nodes is different
&lt;br&gt;+ &amp;nbsp;// from the malloc size class of slist nodes. &amp;nbsp;When they fall into the same
&lt;br&gt;+ &amp;nbsp;// class, the only slist benefit is from having to set fewer links, so
&lt;br&gt;+ &amp;nbsp;// the factor F should be much smaller, closer to 0 than to 1.
&lt;br&gt;+ &amp;nbsp;// This could be implemented by passing the size classes in the config file.
&lt;br&gt;+ &amp;nbsp;// For now, we always assume F to be 1.
&lt;br&gt;+ &amp;nbsp;float __magnitude() const
&lt;br&gt;+ &amp;nbsp;{ if (!_M_rewind) return _M_operations; else return 0; }
&lt;br&gt;+ &amp;nbsp;void __merge(const __list2slist_info&amp; __o) {};
&lt;br&gt;+ &amp;nbsp;void __write(FILE* __f) const;
&lt;br&gt;+ &amp;nbsp;const char* __advice() const
&lt;br&gt;+ &amp;nbsp;{ return &amp;quot;change std::list to std::forward_list or __gnu_cxx::slist&amp;quot;; }
&lt;br&gt;+ &amp;nbsp;void __opr_rewind() { _M_rewind = true; _M_valid = false;}
&lt;br&gt;+ &amp;nbsp;void __record_operation() { _M_operations++; }
&lt;br&gt;+ &amp;nbsp;bool __has_rewind() { return _M_rewind; }
&lt;br&gt;+
&lt;br&gt;+private:
&lt;br&gt;+ &amp;nbsp;bool _M_rewind;
&lt;br&gt;+ &amp;nbsp;size_t _M_operations;
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+class __list2slist_stack_info: public __list2slist_info {
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__list2slist_stack_info(const __list2slist_info&amp; __o) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: __list2slist_info(__o) {}
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+class __trace_list_to_slist
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: public __trace_base&amp;lt;__list2slist_info, __list2slist_stack_info&amp;gt; 
&lt;br&gt;+{
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;~__trace_list_to_slist() {}
&lt;br&gt;+ &amp;nbsp;__trace_list_to_slist() 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: __trace_base&amp;lt;__list2slist_info, __list2slist_stack_info&amp;gt;()
&lt;br&gt;+ &amp;nbsp;{ __id = &amp;quot;list-to-slist&amp;quot;; }
&lt;br&gt;+ &amp;nbsp;void __opr_rewind(const void* __obj);
&lt;br&gt;+ &amp;nbsp;void __record_operation(const void* __obj);
&lt;br&gt;+ &amp;nbsp;void __insert(const __object_t __obj, __stack_t __stack)
&lt;br&gt;+ &amp;nbsp;{ __add_object(__obj, __list2slist_info(__stack)); }
&lt;br&gt;+ &amp;nbsp;void __destruct(const void* __obj);
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+inline void __list2slist_info::__write(FILE* __f) const
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;fprintf(__f, &amp;quot;%s\n&amp;quot;, _M_rewind ? &amp;quot;invalid&amp;quot; : &amp;quot;valid&amp;quot;);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist::__destruct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__is_on())
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__list2slist_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (!__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__retire_object(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+// Initialization and report.
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist_init()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist = new __trace_list_to_slist();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist_report(FILE* __f, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __warning_vector_t&amp; __warnings)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (__tables&amp;lt;0&amp;gt;::_S_list_to_slist) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist-&amp;gt;__collect_warnings(__warnings);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist-&amp;gt;__write(__f);
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist::__opr_rewind(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2slist_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__opr_rewind();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist::__record_operation(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2slist_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__record_operation();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+// Implementations of instrumentation hooks.
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist_rewind(const void* __obj) 
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist-&amp;gt;__opr_rewind(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist_operation(const void* __obj) 
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist-&amp;gt;__record_operation(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist_construct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist-&amp;gt;__insert(__obj, __get_stack());
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_slist_destruct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_slist-&amp;gt;__destruct(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+} // namespace __cxxprof_impl
&lt;br&gt;+#endif /* PROFCXX_PROFILER_LIST_TO_SLIST_H */
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler_trace.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler_trace.h	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler_trace.h	(working copy)
&lt;br&gt;@@ -54,6 +54,8 @@
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;algorithm&amp;gt;
&lt;br&gt;+#include &amp;lt;fstream&amp;gt;
&lt;br&gt;+#include &amp;lt;string&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;utility&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#if defined _GLIBCXX_PROFILE_THREADS &amp;&amp; defined HAVE_TLS
&lt;br&gt;@@ -132,15 +134,24 @@
&lt;br&gt;&amp;nbsp;class __trace_map2umap;
&lt;br&gt;&amp;nbsp;class __trace_vector_size;
&lt;br&gt;&amp;nbsp;class __trace_vector_to_list;
&lt;br&gt;+class __trace_list_to_slist; 
&lt;br&gt;+class __trace_list_to_vector; 
&lt;br&gt;+class __trace_list_to_set; 
&lt;br&gt;&amp;nbsp;void __trace_vector_size_init();
&lt;br&gt;&amp;nbsp;void __trace_hashtable_size_init();
&lt;br&gt;&amp;nbsp;void __trace_hash_func_init();
&lt;br&gt;&amp;nbsp;void __trace_vector_to_list_init();
&lt;br&gt;+void __trace_list_to_slist_init(); &amp;nbsp;
&lt;br&gt;+void __trace_list_to_vector_init(); &amp;nbsp;
&lt;br&gt;+void __trace_list_to_set_init(); &amp;nbsp;
&lt;br&gt;&amp;nbsp;void __trace_map_to_unordered_map_init();
&lt;br&gt;&amp;nbsp;void __trace_vector_size_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;&amp;nbsp;void __trace_hashtable_size_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;&amp;nbsp;void __trace_hash_func_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;&amp;nbsp;void __trace_vector_to_list_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;+void __trace_list_to_slist_report(FILE*, __warning_vector_t&amp;); 
&lt;br&gt;+void __trace_list_to_vector_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;+void __trace_list_to_set_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;&amp;nbsp;void __trace_map_to_unordered_map_report(FILE*, __warning_vector_t&amp;);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Utility functions.
&lt;br&gt;@@ -164,6 +175,33 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;static __trace_map2umap* _S_map2umap;
&lt;br&gt;&amp;nbsp; &amp;nbsp;static __trace_vector_size* _S_vector_size;
&lt;br&gt;&amp;nbsp; &amp;nbsp;static __trace_vector_to_list* _S_vector_to_list;
&lt;br&gt;+ &amp;nbsp;static __trace_list_to_slist* _S_list_to_slist; 
&lt;br&gt;+ &amp;nbsp;static __trace_list_to_vector* _S_list_to_vector;
&lt;br&gt;+ &amp;nbsp;static __trace_list_to_set* _S_list_to_set; 
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;static float __vector_shift_cost_factor;
&lt;br&gt;+ &amp;nbsp;static float __vector_iterate_cost_factor; 
&lt;br&gt;+ &amp;nbsp;static float __vector_resize_cost_factor; 
&lt;br&gt;+		
&lt;br&gt;+ &amp;nbsp;static float __list_shift_cost_factor;
&lt;br&gt;+ &amp;nbsp;static float __list_iterate_cost_factor; 
&lt;br&gt;+ &amp;nbsp;static float __list_resize_cost_factor; 
&lt;br&gt;+	
&lt;br&gt;+ &amp;nbsp;static float __set_insert_cost_factor;
&lt;br&gt;+ &amp;nbsp;static float __set_find_cost_factor;
&lt;br&gt;+ &amp;nbsp;
&lt;br&gt;+ &amp;nbsp;static float __list_insert_cost;
&lt;br&gt;+ &amp;nbsp;static float __list_find_cost ;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;static float __map_insert_cost_factor ;
&lt;br&gt;+ &amp;nbsp;static float __map_erase_cost_factor ;
&lt;br&gt;+ &amp;nbsp;static float __map_find_cost_factor ;
&lt;br&gt;+ &amp;nbsp;static float __map_iterate_cost;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;static float __umap_insert_cost;
&lt;br&gt;+ &amp;nbsp;static float __umap_erase_cost ;
&lt;br&gt;+ &amp;nbsp;static float __umap_find_cost ;
&lt;br&gt;+ &amp;nbsp;static float __umap_iterate_cost;
&lt;br&gt;&amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;@@ -176,7 +214,55 @@
&lt;br&gt;&amp;nbsp;__trace_vector_size* __tables&amp;lt;_Unused&amp;gt;::_S_vector_size = NULL;
&lt;br&gt;&amp;nbsp;template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;&amp;nbsp;__trace_vector_to_list* __tables&amp;lt;_Unused&amp;gt;::_S_vector_to_list = NULL;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt; 
&lt;br&gt;+__trace_list_to_slist* __tables&amp;lt;_Unused&amp;gt;::_S_list_to_slist = NULL;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt; 
&lt;br&gt;+__trace_list_to_vector* __tables&amp;lt;_Unused&amp;gt;::_S_list_to_vector = NULL;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+__trace_list_to_set* __tables&amp;lt;_Unused&amp;gt;::_S_list_to_set = NULL;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__vector_shift_cost_factor = 1;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__vector_iterate_cost_factor = 1; 
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__vector_resize_cost_factor = 1; 
&lt;br&gt;+	
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__list_shift_cost_factor = 0;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__list_iterate_cost_factor = 10; 
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__list_resize_cost_factor = 0; 
&lt;br&gt;+	
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__set_insert_cost_factor = 1.2;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__set_find_cost_factor = 1.0;
&lt;br&gt;+
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__list_insert_cost = 1.0;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__list_find_cost = 1.0;
&lt;br&gt;+
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__map_insert_cost_factor = 1.5;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__map_erase_cost_factor = 1.5;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__map_find_cost_factor = 1;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__map_iterate_cost = 2.3;
&lt;br&gt;+
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__umap_insert_cost = 12.0;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__umap_erase_cost = 12.0;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__umap_find_cost = 10.0;
&lt;br&gt;+template &amp;lt;int _Unused&amp;gt;
&lt;br&gt;+float __tables&amp;lt;_Unused&amp;gt;::__umap_iterate_cost = 1.7;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/** @brief Storage for user defined parameters. &amp;nbsp;Has only static fields. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp;template &amp;lt;int _Unused=0&amp;gt;
&lt;br&gt;&amp;nbsp;class __settings {
&lt;br&gt;@@ -439,7 +525,6 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;size_t root_len = strlen(__settings&amp;lt;0&amp;gt;::_S_trace_file_name);
&lt;br&gt;&amp;nbsp; &amp;nbsp;size_t ext_len = strlen(extension);
&lt;br&gt;&amp;nbsp; &amp;nbsp;char* file_name = new char[root_len + 1 + ext_len + 1];
&lt;br&gt;- &amp;nbsp;char* p = file_name;
&lt;br&gt;&amp;nbsp; &amp;nbsp;memcpy(file_name, __settings&amp;lt;0&amp;gt;::_S_trace_file_name, root_len);
&lt;br&gt;&amp;nbsp; &amp;nbsp;*(file_name + root_len) = '.';
&lt;br&gt;&amp;nbsp; &amp;nbsp;memcpy(file_name + root_len + 1, extension, ext_len + 1);
&lt;br&gt;@@ -470,6 +555,9 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;__trace_hashtable_size_report(__raw_file, __warnings);
&lt;br&gt;&amp;nbsp; &amp;nbsp;__trace_hash_func_report(__raw_file, __warnings);
&lt;br&gt;&amp;nbsp; &amp;nbsp;__trace_vector_to_list_report(__raw_file, __warnings);
&lt;br&gt;+ &amp;nbsp;__trace_list_to_slist_report(__raw_file, __warnings);
&lt;br&gt;+ &amp;nbsp;__trace_list_to_vector_report(__raw_file, __warnings);
&lt;br&gt;+ &amp;nbsp;__trace_list_to_set_report(__raw_file, __warnings); 
&lt;br&gt;&amp;nbsp; &amp;nbsp;__trace_map_to_unordered_map_report(__raw_file, __warnings);
&lt;br&gt;&amp;nbsp; &amp;nbsp;fclose(__raw_file);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -512,6 +600,82 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+inline void __read_cost_factors()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;std::string conf_file_name(__settings&amp;lt;0&amp;gt;::_S_trace_file_name);
&lt;br&gt;+ &amp;nbsp;conf_file_name += &amp;quot;.conf&amp;quot;;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;std::ifstream __conf_file( conf_file_name.c_str());
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (__conf_file.is_open()) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;std::string line;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;while (getline ( __conf_file, line) ) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;std::string::size_type i = line.find_first_not_of ( &amp;quot; \t\n\v&amp;quot; );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;if (line.length() &amp;lt;= 0 || line[i] == '#') {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Skip empty lines or comments.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;// Trim.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;line.erase(remove(line.begin(), line.end(), ' '), line.end());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;std::string::size_type pos = line.find(&amp;quot;=&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;std::string __factor_name = line.substr(0, pos);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;std::string::size_type end = line.find_first_of(&amp;quot;;\n&amp;quot;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;std::string __factor_value = line.substr(pos + 1, end - pos);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;setenv(__factor_name.c_str(), __factor_value.c_str(), 0);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;} 
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __set_cost_factors()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;char* __env_cost_factor;
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__vector_shift_cost_factor&amp;quot;)) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__vector_shift_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__vector_iterate_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__vector_iterate_cost_factor = atof(__env_cost_factor); 
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__vector_resize_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__vector_resize_cost_factor = atof(__env_cost_factor); 
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__list_shift_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__list_shift_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__list_iterate_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__list_iterate_cost_factor = atof(__env_cost_factor); 
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__list_resize_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__list_resize_cost_factor = atof(__env_cost_factor); 
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__set_insert_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__set_insert_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__set_find_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__set_find_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__list_insert_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__list_insert_cost = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__list_find_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__list_find_cost = atof(__env_cost_factor);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__map_insert_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__map_insert_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__map_erase_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__map_erase_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__map_find_cost_factor&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__map_find_cost_factor = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__map_iterate_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__map_iterate_cost = atof(__env_cost_factor);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__umap_insert_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__umap_insert_cost = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__umap_erase_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__umap_erase_cost = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__umap_find_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__umap_find_cost = atof(__env_cost_factor);
&lt;br&gt;+ &amp;nbsp;if (__env_cost_factor = getenv(&amp;quot;__umap_iterate_cost&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::__umap_iterate_cost = atof(__env_cost_factor);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;inline void __profcxx_init_unconditional()
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;__mutex&amp;lt;0&amp;gt;::__lock(__mutex&amp;lt;0&amp;gt;::__global_lock);
&lt;br&gt;@@ -529,11 +693,16 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__set_max_stack_trace_depth();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__set_max_mem();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__set_trace_path();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__read_cost_factors(); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__set_cost_factors(); 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_vector_size_init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_hashtable_size_init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_hash_func_init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_vector_to_list_init();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_list_to_slist_init(); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_list_to_vector_init();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_list_to_set_init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__trace_map_to_unordered_map_init();
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;atexit(__report);
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler_vector_to_list.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler_vector_to_list.h	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler_vector_to_list.h	(working copy)
&lt;br&gt;@@ -28,8 +28,8 @@
&lt;br&gt;&amp;nbsp;// reasons why the executable file might be covered by the GNU General
&lt;br&gt;&amp;nbsp;// Public License.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-/** @file profile/impl/profiler_trace.h
&lt;br&gt;- * &amp;nbsp;@brief Data structures to represent profiling traces.
&lt;br&gt;+/** @file profile/impl/profiler_vector_to_list.h
&lt;br&gt;+ * &amp;nbsp;@brief diagnostics for vector to list.
&lt;br&gt;&amp;nbsp; */
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Written by Lixia Liu and Silvius Rus.
&lt;br&gt;@@ -80,8 +80,9 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;void __set_invalid() { _M_valid = false; }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;void __opr_insert(size_t __pos, size_t __num);
&lt;br&gt;- &amp;nbsp;void __opr_iterate(size_t __num) { _M_iterate += __num; }
&lt;br&gt;+ &amp;nbsp;void __opr_iterate(size_t __num);
&lt;br&gt;&amp;nbsp; &amp;nbsp;void __resize(size_t __from, size_t __to);
&lt;br&gt;+ &amp;nbsp;void __opr_find(size_t __size);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;private:
&lt;br&gt;&amp;nbsp; &amp;nbsp;size_t _M_shift_count;
&lt;br&gt;@@ -123,6 +124,17 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_resize += __from;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+inline void __vector2list_info::__opr_iterate(size_t __num)
&lt;br&gt;+{ 
&lt;br&gt;+ &amp;nbsp;_M_iterate += __num; 
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __vector2list_info::__opr_find(size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;// Use average case complexity 
&lt;br&gt;+ &amp;nbsp;_M_iterate += 3.0 / 4.0 * __size;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;/** @brief A vector-to-list instrumentation line in the stack table. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp;class __vector2list_stack_info: public __vector2list_info {
&lt;br&gt;&amp;nbsp; public:
&lt;br&gt;@@ -153,6 +165,8 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;void __resize(const void* __obj, size_t __from, size_t __to);
&lt;br&gt;&amp;nbsp; &amp;nbsp;float __vector_cost(size_t __shift, size_t __iterate, size_t __resize);
&lt;br&gt;&amp;nbsp; &amp;nbsp;float __list_cost(size_t __shift, size_t __iterate, size_t __resize);
&lt;br&gt;+ &amp;nbsp;void __opr_find(const void* __obj, size_t __size);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline __trace_vector_to_list::__trace_vector_to_list()
&lt;br&gt;@@ -176,25 +190,29 @@
&lt;br&gt;&amp;nbsp;// Cost model. &amp;nbsp;XXX: get this from the cost model database instead.
&lt;br&gt;&amp;nbsp;// &amp;nbsp;Vector operation cost:
&lt;br&gt;&amp;nbsp;// &amp;nbsp; - Cost per shift: 1
&lt;br&gt;-// &amp;nbsp; - Cost per access: 1
&lt;br&gt;+// &amp;nbsp; - Cost per iterate: 1
&lt;br&gt;&amp;nbsp;// &amp;nbsp; - Cost per resize: 1
&lt;br&gt;&amp;nbsp;// &amp;nbsp;List operation cost:
&lt;br&gt;&amp;nbsp;// &amp;nbsp; - Cost per shift: 0
&lt;br&gt;-// &amp;nbsp; - Cost per access: 10
&lt;br&gt;+// &amp;nbsp; - Cost per iterate: 10
&lt;br&gt;&amp;nbsp;// &amp;nbsp; - Cost per resize: 0
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline float __trace_vector_to_list::__vector_cost(size_t __shift, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __iterate,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __resize)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;return __shift * 1 + __iterate * 1 + __resize * 1; 
&lt;br&gt;+ &amp;nbsp;return __shift * __tables&amp;lt;0&amp;gt;::__vector_shift_cost_factor +
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__iterate * __tables&amp;lt;0&amp;gt;::__vector_iterate_cost_factor + 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__resize * __tables&amp;lt;0&amp;gt;::__vector_resize_cost_factor; 
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline float __trace_vector_to_list::__list_cost(size_t __shift, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __iterate,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __resize)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;return __shift * 0 + __iterate * 10 + __resize * 0; 
&lt;br&gt;+ &amp;nbsp;return __shift * __tables&amp;lt;0&amp;gt;::__list_shift_cost_factor +
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__iterate * __tables&amp;lt;0&amp;gt;::__list_iterate_cost_factor + 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__resize * __tables&amp;lt;0&amp;gt;::__list_resize_cost_factor; 
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline void __trace_vector_to_list::__destruct(const void* __obj)
&lt;br&gt;@@ -247,6 +265,14 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;__res-&amp;gt;__resize(__from, __to);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+inline void __trace_vector_to_list::__opr_find(const void* __obj,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__vector2list_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__opr_find(__size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;&amp;nbsp;// Initialization and report.
&lt;br&gt;&amp;nbsp;//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;@@ -292,7 +318,7 @@
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-inline void __trace_vector_to_list_iterate(const void* __obj, size_t __num)
&lt;br&gt;+inline void __trace_vector_to_list_iterate(const void* __obj, size_t __num = 1)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -314,5 +340,12 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_vector_to_list-&amp;gt;__resize(__obj, __from, __to);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+inline void __trace_vector_to_list_find(const void* __obj, size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_vector_to_list-&amp;gt;__opr_find(__obj, __size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;} // namespace __cxxprof_impl
&lt;br&gt;&amp;nbsp;#endif /* PROFCXX_PROFILER_VECTOR_TO_LIST_H__ */
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler_list_to_vector.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler_list_to_vector.h	(revision 0)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler_list_to_vector.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,320 @@
&lt;br&gt;+// -*- C++ -*-
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the terms
&lt;br&gt;+// of the GNU General Public License as published by the Free Software
&lt;br&gt;+// Foundation; either version 2, or (at your option) any later
&lt;br&gt;+// version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful, but
&lt;br&gt;+// WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+// General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License
&lt;br&gt;+// along with this library; see the file COPYING. &amp;nbsp;If not, write to
&lt;br&gt;+// the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
&lt;br&gt;+// MA 02111-1307, USA.
&lt;br&gt;+
&lt;br&gt;+// As a special exception, you may use this file as part of a free
&lt;br&gt;+// software library without restriction. &amp;nbsp;Specifically, if other files
&lt;br&gt;+// instantiate templates or use macros or inline functions from this
&lt;br&gt;+// file, or you compile this file and link it with other files to
&lt;br&gt;+// produce an executable, this file does not by itself cause the
&lt;br&gt;+// resulting executable to be covered by the GNU General Public
&lt;br&gt;+// License. &amp;nbsp;This exception does not however invalidate any other
&lt;br&gt;+// reasons why the executable file might be covered by the GNU General
&lt;br&gt;+// Public License.
&lt;br&gt;+
&lt;br&gt;+/** @file profile/impl/profiler_list_to_vector.h
&lt;br&gt;+ * &amp;nbsp;@brief diagnostics for list to vector.
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+// Written by Changhee Jung.
&lt;br&gt;+
&lt;br&gt;+#ifndef PROFCXX_PROFILER_LIST_TO_VECTOR_H__
&lt;br&gt;+#define PROFCXX_PROFILER_LIST_TO_VECTOR_H__ 1
&lt;br&gt;+
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+#include &amp;lt;cstdio&amp;gt;
&lt;br&gt;+#include &amp;lt;cstdlib&amp;gt;
&lt;br&gt;+#include &amp;lt;cstring&amp;gt;
&lt;br&gt;+#else
&lt;br&gt;+#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;+#include &amp;lt;stdint.h&amp;gt;
&lt;br&gt;+#include &amp;lt;string.h&amp;gt;
&lt;br&gt;+#endif
&lt;br&gt;+#include &amp;lt;string&amp;gt;
&lt;br&gt;+#include &amp;lt;sstream&amp;gt;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_node.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_trace.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;+namespace __cxxprof_impl
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+/** @brief A list-to-vector instrumentation line in the object table. &amp;nbsp;*/
&lt;br&gt;+class __list2vector_info: public __object_info_base
&lt;br&gt;+{
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__list2vector_info()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;:_M_shift_count(0), _M_iterate(0), _M_resize(0), _M_list_cost(0),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; _M_vector_cost(0), _M_valid(true), _M_max_size(0) {}
&lt;br&gt;+ &amp;nbsp;__list2vector_info(__stack_t __stack)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: __object_info_base(__stack), _M_shift_count(0), _M_iterate(0),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_resize(0), _M_list_cost(0), _M_vector_cost(0), _M_valid(true),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_max_size(0) {}
&lt;br&gt;+ &amp;nbsp;virtual ~__list2vector_info() {}
&lt;br&gt;+ &amp;nbsp;__list2vector_info(const __list2vector_info&amp; __o);
&lt;br&gt;+ &amp;nbsp;void __merge(const __list2vector_info&amp; __o);
&lt;br&gt;+ &amp;nbsp;void __write(FILE* __f) const;
&lt;br&gt;+ &amp;nbsp;float __magnitude() const { return _M_list_cost - _M_vector_cost; }
&lt;br&gt;+ &amp;nbsp;const char* __advice() const;
&lt;br&gt;+ &amp;nbsp;size_t __shift_count() { return _M_shift_count; }
&lt;br&gt;+ &amp;nbsp;size_t __iterate() &amp;nbsp; { return _M_iterate; }
&lt;br&gt;+ &amp;nbsp;float __list_cost() { return _M_list_cost; }
&lt;br&gt;+ &amp;nbsp;size_t __resize() { return _M_resize; }
&lt;br&gt;+ &amp;nbsp;void __set_list_cost(float __lc) { _M_list_cost = __lc; }
&lt;br&gt;+ &amp;nbsp;void __set_vector_cost(float __vc) { _M_vector_cost = __vc; }
&lt;br&gt;+ &amp;nbsp;bool __is_valid() { return _M_valid; }
&lt;br&gt;+ &amp;nbsp;void __set_invalid() { _M_valid = false; }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;void __opr_insert(size_t __shift, size_t __size);
&lt;br&gt;+ &amp;nbsp;void __opr_iterate(size_t __num) { _M_iterate += __num;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;void __resize(size_t __from, size_t __to);
&lt;br&gt;+
&lt;br&gt;+private:
&lt;br&gt;+ &amp;nbsp;size_t _M_shift_count;
&lt;br&gt;+ &amp;nbsp;size_t _M_iterate;
&lt;br&gt;+ &amp;nbsp;size_t _M_resize;
&lt;br&gt;+ &amp;nbsp;float _M_list_cost;
&lt;br&gt;+ &amp;nbsp;float _M_vector_cost;
&lt;br&gt;+ &amp;nbsp;bool &amp;nbsp;_M_valid;
&lt;br&gt;+ &amp;nbsp;size_t _M_max_size;
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+inline __list2vector_info::__list2vector_info(const __list2vector_info&amp; __o)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: __object_info_base(__o)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;_M_shift_count &amp;nbsp;= __o._M_shift_count;
&lt;br&gt;+ &amp;nbsp;_M_iterate &amp;nbsp; &amp;nbsp; &amp;nbsp;= __o._M_iterate;
&lt;br&gt;+ &amp;nbsp;_M_vector_cost &amp;nbsp;= __o._M_vector_cost;
&lt;br&gt;+ &amp;nbsp;_M_list_cost &amp;nbsp; &amp;nbsp;= __o._M_list_cost;
&lt;br&gt;+ &amp;nbsp;_M_valid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= __o._M_valid;
&lt;br&gt;+ &amp;nbsp;_M_resize &amp;nbsp; &amp;nbsp; &amp;nbsp; = __o._M_resize;
&lt;br&gt;+ &amp;nbsp;_M_max_size &amp;nbsp; &amp;nbsp; = __o._M_max_size;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline const char* __list2vector_info::__advice() const {
&lt;br&gt;+ &amp;nbsp;std::stringstream __sstream;
&lt;br&gt;+ &amp;nbsp;__sstream 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; &amp;quot;change std::list to std::vector and its initial size from 0 to &amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt; _M_max_size;
&lt;br&gt;+ &amp;nbsp;return __sstream.str().c_str();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2vector_info::__merge(const __list2vector_info&amp; __o)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;_M_shift_count &amp;nbsp;+= __o._M_shift_count;
&lt;br&gt;+ &amp;nbsp;_M_iterate &amp;nbsp; &amp;nbsp; &amp;nbsp;+= __o._M_iterate;
&lt;br&gt;+ &amp;nbsp;_M_vector_cost &amp;nbsp;+= __o._M_vector_cost;
&lt;br&gt;+ &amp;nbsp;_M_list_cost &amp;nbsp; &amp;nbsp;+= __o._M_list_cost;
&lt;br&gt;+ &amp;nbsp;_M_valid &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;= __o._M_valid;
&lt;br&gt;+ &amp;nbsp;_M_resize &amp;nbsp; &amp;nbsp; &amp;nbsp; += __o._M_resize;
&lt;br&gt;+ &amp;nbsp;_M_max_size &amp;nbsp; &amp;nbsp; = __max( _M_max_size, __o._M_max_size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2vector_info::__opr_insert(size_t __shift, size_t __size) 
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;_M_shift_count += __shift;
&lt;br&gt;+ &amp;nbsp;_M_max_size = __max(_M_max_size, __size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2vector_info::__resize(size_t __from, size_t __to)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;_M_resize += __from;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+class __list2vector_stack_info: public __list2vector_info {
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__list2vector_stack_info(const __list2vector_info&amp; __o) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: __list2vector_info(__o) {}
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+class __trace_list_to_vector
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: public __trace_base&amp;lt;__list2vector_info, __list2vector_stack_info&amp;gt; 
&lt;br&gt;+{
&lt;br&gt;+ public:
&lt;br&gt;+ &amp;nbsp;__trace_list_to_vector();
&lt;br&gt;+ &amp;nbsp;~__trace_list_to_vector() {}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Insert a new node at construct with object, callstack and initial size. 
&lt;br&gt;+ &amp;nbsp;void __insert(__object_t __obj, __stack_t __stack);
&lt;br&gt;+ &amp;nbsp;// Call at destruction/clean to set container final size.
&lt;br&gt;+ &amp;nbsp;void __destruct(const void* __obj);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Find the node in the live map.
&lt;br&gt;+ &amp;nbsp;__list2vector_info* __find(const void* __obj);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Collect cost of operations.
&lt;br&gt;+ &amp;nbsp;void __opr_insert(const void* __obj, size_t __shift, size_t __size);
&lt;br&gt;+ &amp;nbsp;void __opr_iterate(const void* __obj, size_t __num);
&lt;br&gt;+ &amp;nbsp;void __invalid_operator(const void* __obj);
&lt;br&gt;+ &amp;nbsp;void __resize(const void* __obj, size_t __from, size_t __to);
&lt;br&gt;+ &amp;nbsp;float __vector_cost(size_t __shift, size_t __iterate);
&lt;br&gt;+ &amp;nbsp;float __list_cost(size_t __shift, size_t __iterate);
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+inline __trace_list_to_vector::__trace_list_to_vector()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;: __trace_base&amp;lt;__list2vector_info, __list2vector_stack_info&amp;gt;()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__id = &amp;quot;list-to-vector&amp;quot;;
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector::__insert(__object_t __obj,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __stack_t __stack)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__add_object(__obj, __list2vector_info(__stack));
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __list2vector_info::__write(FILE* __f) const
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;fprintf(__f, &amp;quot;%Zu %Zu %Zu %.0f %.0f\n&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_shift_count, _M_resize, _M_iterate, _M_vector_cost, _M_list_cost);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline float __trace_list_to_vector::__vector_cost(size_t __shift, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __iterate)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;// The resulting vector will use a 'reserve' method.
&lt;br&gt;+ &amp;nbsp;return __shift * __tables&amp;lt;0&amp;gt;::__vector_shift_cost_factor + 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__iterate * __tables&amp;lt;0&amp;gt;::__vector_iterate_cost_factor ; 
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline float __trace_list_to_vector::__list_cost(size_t __shift, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __iterate)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;return __shift * __tables&amp;lt;0&amp;gt;::__list_shift_cost_factor + 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__iterate * __tables&amp;lt;0&amp;gt;::__list_iterate_cost_factor ; 
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector::__destruct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__is_on())
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;+
&lt;br&gt;+ __list2vector_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (!__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;float __vc = __vector_cost(__res-&amp;gt;__shift_count(), __res-&amp;gt;__iterate());
&lt;br&gt;+ &amp;nbsp;float __lc = __list_cost(__res-&amp;gt;__shift_count(), __res-&amp;gt;__iterate());
&lt;br&gt;+ &amp;nbsp;__res-&amp;gt;__set_vector_cost(__vc);
&lt;br&gt;+ &amp;nbsp;__res-&amp;gt;__set_list_cost(__lc);
&lt;br&gt;+ &amp;nbsp;__retire_object(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector::__opr_insert(const void* __obj, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __shift, size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2vector_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__opr_insert(__shift, __size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector::__opr_iterate(const void* __obj,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_t __num)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2vector_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__opr_iterate(__num);
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector::__invalid_operator(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2vector_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__set_invalid();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector::__resize(const void* __obj, size_t __from, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_t __to)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__list2vector_info* __res = __get_object_info(__obj);
&lt;br&gt;+ &amp;nbsp;if (__res)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__res-&amp;gt;__resize(__from, __to);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+// Initialization and report.
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_init()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector = new __trace_list_to_vector();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_report(FILE* __f, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__warning_vector_t&amp; __warnings)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (__tables&amp;lt;0&amp;gt;::_S_list_to_vector) {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__collect_warnings(__warnings);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__write(__f);
&lt;br&gt;+ &amp;nbsp;}
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+// Implementations of instrumentation hooks.
&lt;br&gt;+//////////////////////////////////////////////////////////////////////////////
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_construct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__insert(__obj, __get_stack());
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_destruct(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__destruct(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_insert(const void* __obj, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_t __shift, size_t __size)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__opr_insert(__obj, __shift, __size);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_iterate(const void* __obj, size_t __num = 1)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__opr_iterate(__obj, __num);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_invalid_operator(const void* __obj)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__invalid_operator(__obj);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+inline void __trace_list_to_vector_resize(const void* __obj, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_t __from, size_t __to)
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;if (!__profcxx_init()) return;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;__tables&amp;lt;0&amp;gt;::_S_list_to_vector-&amp;gt;__resize(__obj, __from, __to);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+} // namespace __cxxprof_impl
&lt;br&gt;+#endif /* PROFCXX_PROFILER_LIST_TO_VECTOR_H__ */
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler.h	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler.h	(working copy)
&lt;br&gt;@@ -120,6 +120,27 @@
&lt;br&gt;&amp;nbsp;void __trace_vector_to_list_iterate(const void*, size_t);
&lt;br&gt;&amp;nbsp;void __trace_vector_to_list_invalid_operator(const void*);
&lt;br&gt;&amp;nbsp;void __trace_vector_to_list_resize(const void*, size_t, size_t);
&lt;br&gt;+void __trace_vector_to_list_find(const void*, size_t);
&lt;br&gt;+
&lt;br&gt;+void __trace_list_to_slist_destruct(const void*);
&lt;br&gt;+void __trace_list_to_slist_construct(const void*);
&lt;br&gt;+void __trace_list_to_slist_rewind(const void*); 
&lt;br&gt;+void __trace_list_to_slist_operation(const void*);
&lt;br&gt;+
&lt;br&gt;+void __trace_list_to_vector_destruct(const void*);
&lt;br&gt;+void __trace_list_to_vector_construct(const void*);
&lt;br&gt;+void __trace_list_to_vector_insert(const void*, size_t, size_t); 
&lt;br&gt;+void __trace_list_to_vector_iterate(const void*, size_t);
&lt;br&gt;+void __trace_list_to_vector_invalid_operator(const void*);
&lt;br&gt;+void __trace_list_to_vector_resize(const void*, size_t, size_t); 
&lt;br&gt;+
&lt;br&gt;+void __trace_list_to_set_destruct(const void*);
&lt;br&gt;+void __trace_list_to_set_construct(const void*);
&lt;br&gt;+void __trace_list_to_set_insert(const void*, size_t, size_t); 
&lt;br&gt;+void __trace_list_to_set_iterate(const void*, size_t);
&lt;br&gt;+void __trace_list_to_set_invalid_operator(const void*);
&lt;br&gt;+void __trace_list_to_set_find(const void*, size_t); 
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;void __trace_map_to_unordered_map_construct(const void*);
&lt;br&gt;&amp;nbsp;void __trace_map_to_unordered_map_invalidate(const void*);
&lt;br&gt;&amp;nbsp;void __trace_map_to_unordered_map_insert(const void*, size_t, size_t);
&lt;br&gt;@@ -129,16 +150,39 @@
&lt;br&gt;&amp;nbsp;void __trace_map_to_unordered_map_destruct(const void*);
&lt;br&gt;&amp;nbsp;} // namespace __cxxprof_impl
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-// Master switch turns on all diagnostics.
&lt;br&gt;+// Master switch turns on all diagnostics that are not explicitly turned off.
&lt;br&gt;&amp;nbsp;#ifdef _GLIBCXX_PROFILE
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_HASHTABLE_TOO_SMALL
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_HASHTABLE_TOO_LARGE
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_VECTOR_TOO_SMALL
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_VECTOR_TOO_SMALL
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_VECTOR_TOO_LARGE
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_VECTOR_TOO_LARGE
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_INEFFICIENT_HASH
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_INEFFICIENT_HASH
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_VECTOR_TO_LIST
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_VECTOR_TO_LIST
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_LIST_TO_SLIST
&lt;br&gt;+#define _GLIBCXX_PROFILE_LIST_TO_SLIST
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_LIST_TO_VECTOR
&lt;br&gt;+#define _GLIBCXX_PROFILE_LIST_TO_VECTOR
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_LIST_TO_SET
&lt;br&gt;+#define _GLIBCXX_PROFILE_LIST_TO_SET
&lt;br&gt;+#endif
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_NO_MAP_TO_UNORDERED_MAP
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Expose global management routines to user code.
&lt;br&gt;&amp;nbsp;#ifdef _GLIBCXX_PROFILE
&lt;br&gt;@@ -164,10 +208,8 @@
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Turn on/off instrumentation for HASHTABLE_TOO_SMALL and HASHTABLE_TOO_LARGE.
&lt;br&gt;-#if ((defined(_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;&amp; !defined(_NO_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL)) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; || (defined(_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;&amp; !defined(_NO_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE)))
&lt;br&gt;+#if (defined(_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL) \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; || defined(_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE))
&lt;br&gt;&amp;nbsp;#define __profcxx_hashtable_resize(__x...) \
&lt;br&gt;&amp;nbsp; &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_hashtable_size_resize(__x))
&lt;br&gt;@@ -184,10 +226,8 @@
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Turn on/off instrumentation for VECTOR_TOO_SMALL and VECTOR_TOO_LARGE.
&lt;br&gt;-#if ((defined(_GLIBCXX_PROFILE_VECTOR_TOO_SMALL) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;&amp; !defined(_NO_GLIBCXX_PROFILE_VECTOR_TOO_SMALL)) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; || (defined(_GLIBCXX_PROFILE_VECTOR_TOO_LARGE) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;&amp; !defined(_NO_GLIBCXX_PROFILE_VECTOR_TOO_LARGE)))
&lt;br&gt;+#if (defined(_GLIBCXX_PROFILE_VECTOR_TOO_SMALL) \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; || defined(_GLIBCXX_PROFILE_VECTOR_TOO_LARGE))
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_resize(__x...) \
&lt;br&gt;&amp;nbsp; &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_vector_size_resize(__x))
&lt;br&gt;@@ -204,8 +244,7 @@
&lt;br&gt;&amp;nbsp;#endif 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Turn on/off instrumentation for INEFFICIENT_HASH.
&lt;br&gt;-#if (defined(_GLIBCXX_PROFILE_INEFFICIENT_HASH) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;&amp; !defined(_NO_GLIBCXX_PROFILE_INEFFICIENT_HASH))
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE_INEFFICIENT_HASH)
&lt;br&gt;&amp;nbsp;#define __profcxx_hashtable_construct2(__x...) \
&lt;br&gt;&amp;nbsp; &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_hash_func_construct(__x))
&lt;br&gt;@@ -218,8 +257,7 @@
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;// Turn on/off instrumentation for VECTOR_TO_LIST.
&lt;br&gt;-#if (defined(_GLIBCXX_PROFILE_VECTOR_TO_LIST) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;&amp; !defined(_NO_GLIBCXX_PROFILE_VECTOR_TO_LIST))
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE_VECTOR_TO_LIST)
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_construct2(__x...) \
&lt;br&gt;&amp;nbsp; &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_vector_to_list_construct(__x))
&lt;br&gt;@@ -238,6 +276,9 @@
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_resize2(__x...) \
&lt;br&gt;&amp;nbsp; &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_vector_to_list_resize(__x))
&lt;br&gt;+#define __profcxx_vector_find(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_vector_to_list_find(__x))
&lt;br&gt;&amp;nbsp;#else
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_destruct2(__x...)
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_construct2(__x...)
&lt;br&gt;@@ -245,11 +286,78 @@
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_iterate(__x...)
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_invalid_operator(__x...)
&lt;br&gt;&amp;nbsp;#define __profcxx_vector_resize2(__x...)
&lt;br&gt;+#define __profcxx_vector_find(__x...)
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+// Turn on/off instrumentation for LIST_TO_VECTOR. 
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE_LIST_TO_VECTOR)
&lt;br&gt;+#define __profcxx_list_construct2(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_vector_construct(__x))
&lt;br&gt;+#define __profcxx_list_destruct2(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_vector_destruct(__x))
&lt;br&gt;+#define __profcxx_list_insert(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_vector_insert(__x))
&lt;br&gt;+#define __profcxx_list_iterate(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_vector_iterate(__x))
&lt;br&gt;+#define __profcxx_list_invalid_operator(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_vector_invalid_operator(__x))
&lt;br&gt;+#else
&lt;br&gt;+#define __profcxx_list_destruct2(__x...)
&lt;br&gt;+#define __profcxx_list_construct2(__x...)
&lt;br&gt;+#define __profcxx_list_insert(__x...)
&lt;br&gt;+#define __profcxx_list_iterate(__x...)
&lt;br&gt;+#define __profcxx_list_invalid_operator(__x...)
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;+// Turn on/off instrumentation for LIST_TO_SLIST. &amp;nbsp;
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE_LIST_TO_SLIST)
&lt;br&gt;+#define __profcxx_list_rewind(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_slist_rewind(__x))
&lt;br&gt;+#define __profcxx_list_operation(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_slist_operation(__x))
&lt;br&gt;+#define __profcxx_list_destruct(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_slist_destruct(__x))
&lt;br&gt;+#define __profcxx_list_construct(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_slist_construct(__x))
&lt;br&gt;+#else
&lt;br&gt;+#define __profcxx_list_rewind(__x...) &amp;nbsp;
&lt;br&gt;+#define __profcxx_list_operation(__x...)
&lt;br&gt;+#define __profcxx_list_destruct(__x...) 
&lt;br&gt;+#define __profcxx_list_construct(__x...) &amp;nbsp;
&lt;br&gt;+#endif 
&lt;br&gt;+
&lt;br&gt;+// Turn on/off instrumentation for LIST_TO_SET. 
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE_LIST_TO_SET)
&lt;br&gt;+#define __profcxx_list_construct3(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_set_construct(__x))
&lt;br&gt;+#define __profcxx_list_destruct3(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_set_destruct(__x))
&lt;br&gt;+#define __profcxx_list_insert3(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_set_insert(__x))
&lt;br&gt;+#define __profcxx_list_find3(__x...) \
&lt;br&gt;+ &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_list_to_set_find(__x))
&lt;br&gt;+#else
&lt;br&gt;+#define __profcxx_list_destruct3(__x...)
&lt;br&gt;+#define __profcxx_list_construct3(__x...)
&lt;br&gt;+#define __profcxx_list_insert3(__x...)
&lt;br&gt;+#define __profcxx_list_find3(__x...)
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;// Turn on/off instrumentation for MAP_TO_UNORDERED_MAP.
&lt;br&gt;-#if (defined(_GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP) \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;&amp; !defined(_NO_GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP))
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE_MAP_TO_UNORDERED_MAP)
&lt;br&gt;&amp;nbsp;#define __profcxx_map_to_unordered_map_construct(__x...) \
&lt;br&gt;&amp;nbsp; &amp;nbsp;_GLIBCXX_PROFILE_IMPL_REENTRANCE_GUARD( \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__cxxprof_impl::__trace_map_to_unordered_map_construct(__x))
&lt;br&gt;@@ -322,5 +430,8 @@
&lt;br&gt;&amp;nbsp;#include &amp;quot;profile/impl/profiler_map_to_unordered_map.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;profile/impl/profiler_vector_size.h&amp;quot;
&lt;br&gt;&amp;nbsp;#include &amp;quot;profile/impl/profiler_vector_to_list.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_list_to_slist.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_list_to_vector.h&amp;quot;
&lt;br&gt;+#include &amp;quot;profile/impl/profiler_list_to_set.h&amp;quot;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#endif // PROFCXX_PROFILER_H__
&lt;br&gt;Index: libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/profile/impl/profiler_map_to_unordered_map.h	(working copy)
&lt;br&gt;@@ -53,31 +53,10 @@
&lt;br&gt;&amp;nbsp;namespace __cxxprof_impl
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-// Cost model. XXX: this must be taken from the machine model instead.
&lt;br&gt;-// &amp;nbsp;Map operations:
&lt;br&gt;-// &amp;nbsp; - insert: 1.5 * log(size)
&lt;br&gt;-// &amp;nbsp; - erase: 1.5 * log(size)
&lt;br&gt;-// &amp;nbsp; - find: log(size)
&lt;br&gt;-// &amp;nbsp; - iterate: 2.3
&lt;br&gt;-// &amp;nbsp;Unordered map operations:
&lt;br&gt;-// &amp;nbsp; - insert: 12
&lt;br&gt;-// &amp;nbsp; - erase: 12
&lt;br&gt;-// &amp;nbsp; - find: 10
&lt;br&gt;-// &amp;nbsp; - iterate: 1.7
&lt;br&gt;-
&lt;br&gt;-const float __map_insert_cost_factor = 1.5;
&lt;br&gt;-const float __map_erase_cost_factor = 1.5;
&lt;br&gt;-const float __map_find_cost_factor = 1;
&lt;br&gt;-const float __map_iterate_cost = 2.3;
&lt;br&gt;-
&lt;br&gt;-const float __umap_insert_cost = 12.0;
&lt;br&gt;-const float __umap_erase_cost = 12.0;
&lt;br&gt;-const float __umap_find_cost = 10.0;
&lt;br&gt;-const float __umap_iterate_cost = 1.7;
&lt;br&gt;-
&lt;br&gt;&amp;nbsp;inline int __log2(size_t __size)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;for (int __bit_count = sizeof(size_t) - 1; __bit_count &amp;gt;= 0; --__bit_count) {
&lt;br&gt;+ &amp;nbsp;for (int __bit_count = sizeof(size_t) - 1; __bit_count &amp;gt;= 0; -- __bit_count) 
&lt;br&gt;+ &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if ((2 &amp;lt;&amp;lt; __bit_count) &amp; __size) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return __bit_count;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;@@ -87,17 +66,20 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline float __map_insert_cost(size_t __size)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;return __map_insert_cost_factor * static_cast&amp;lt;float&amp;gt;(__log2(__size));
&lt;br&gt;+ &amp;nbsp;return __tables&amp;lt;0&amp;gt;::__map_insert_cost_factor * static_cast&amp;lt;float&amp;gt;(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__log2(__size));
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline float __map_erase_cost(size_t __size)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;return __map_erase_cost_factor * static_cast&amp;lt;float&amp;gt;(__log2(__size));
&lt;br&gt;+ &amp;nbsp;return __tables&amp;lt;0&amp;gt;::__map_erase_cost_factor * static_cast&amp;lt;float&amp;gt;(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__log2(__size));
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline float __map_find_cost(size_t __size)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;return __map_find_cost_factor * static_cast&amp;lt;float&amp;gt;(__log2(__size));
&lt;br&gt;+ &amp;nbsp;return __tables&amp;lt;0&amp;gt;::__map_find_cost_factor * static_cast&amp;lt;float&amp;gt;(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__log2(__size));
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/** @brief A map-to-unordered_map instrumentation line in the object table. &amp;nbsp;*/
&lt;br&gt;@@ -163,28 +145,28 @@
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_insert += __count;
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_map_cost += __count * __map_insert_cost(__size);
&lt;br&gt;- &amp;nbsp;_M_umap_cost += __count * __umap_insert_cost;
&lt;br&gt;+ &amp;nbsp;_M_umap_cost += __count * __tables&amp;lt;0&amp;gt;::__umap_insert_cost;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline void __map2umap_info:: __record_erase(size_t __size, size_t __count)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_erase += __count;
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_map_cost += __count * __map_erase_cost(__size);
&lt;br&gt;- &amp;nbsp;_M_umap_cost += __count * __umap_erase_cost;
&lt;br&gt;+ &amp;nbsp;_M_umap_cost += __count * __tables&amp;lt;0&amp;gt;::__umap_erase_cost;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline void __map2umap_info:: __record_find(size_t __size)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_find += 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_map_cost += __map_find_cost(__size);
&lt;br&gt;- &amp;nbsp;_M_umap_cost += __umap_find_cost;
&lt;br&gt;+ &amp;nbsp;_M_umap_cost += __tables&amp;lt;0&amp;gt;::__umap_find_cost;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline void __map2umap_info:: __record_iterate(size_t __count)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;_M_iterate += __count;
&lt;br&gt;- &amp;nbsp;_M_map_cost += __count * __map_iterate_cost;
&lt;br&gt;- &amp;nbsp;_M_umap_cost += __count * __umap_iterate_cost;
&lt;br&gt;+ &amp;nbsp;_M_map_cost += __count * __tables&amp;lt;0&amp;gt;::__map_iterate_cost;
&lt;br&gt;+ &amp;nbsp;_M_umap_cost += __count * __tables&amp;lt;0&amp;gt;::__umap_iterate_cost;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;inline void __map2umap_info:: __record_invalidate()
&lt;br&gt;Index: libstdc++-v3/include/profile/vector
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/vector	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/profile/vector	(working copy)
&lt;br&gt;@@ -37,12 +37,12 @@
&lt;br&gt;&amp;nbsp;#include &amp;lt;vector&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;utility&amp;gt;
&lt;br&gt;&amp;nbsp;#include &amp;lt;profile/base.h&amp;gt;
&lt;br&gt;+#include &amp;lt;profile/iterator_tracker.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;namespace std
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;namespace __profile
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;/** @brief Vector wrapper with performance instrumentation. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;typename _Tp,
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; typename _Allocator = std::allocator&amp;lt;_Tp&amp;gt; &amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;class vector
&lt;br&gt;@@ -54,17 +54,21 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::reference &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reference;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::const_reference &amp;nbsp; &amp;nbsp; &amp;nbsp; const_reference;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::iterator iterator;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::const_iterator const_iterator;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef __iterator_tracker&amp;lt;typename _Base::iterator, vector&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef __iterator_tracker&amp;lt;typename _Base::const_iterator, vector&amp;gt;
&lt;br&gt;+				 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::size_type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::difference_type &amp;nbsp; &amp;nbsp; &amp;nbsp; difference_type;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef _Tp				 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value_type;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef _Allocator			 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;allocator_type;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef _Tp				 &amp;nbsp; &amp;nbsp;value_type;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef _Allocator			 &amp;nbsp; &amp;nbsp;allocator_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::pointer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pointer;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::const_pointer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const_pointer;
&lt;br&gt;-
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef std::reverse_iterator&amp;lt;iterator&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; reverse_iterator;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef std::reverse_iterator&amp;lt;const_iterator&amp;gt; const_reverse_iterator;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base&amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_base() &amp;nbsp; &amp;nbsp; &amp;nbsp; { return *this; }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -157,6 +161,58 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using _Base::assign;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using _Base::get_allocator;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;// iterators:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;begin()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return iterator(_Base::begin(), this); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;begin() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::begin(), this); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;end()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return iterator(_Base::end(), this); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;end() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::end(), this); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;reverse_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;rbegin()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return reverse_iterator(end()); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reverse_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;rbegin() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_reverse_iterator(end()); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;reverse_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;rend()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return reverse_iterator(begin()); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reverse_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;rend() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_reverse_iterator(begin()); }
&lt;br&gt;+
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;cbegin() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::begin(), this); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;cend() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::end(), this); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reverse_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;crbegin() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_reverse_iterator(end()); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reverse_iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;crend() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_reverse_iterator(begin()); }
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 23.2.4.2 capacity:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using _Base::size;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using _Base::max_size;
&lt;br&gt;@@ -225,6 +281,15 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename... _Args&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;emplace(iterator __position, _Args&amp;&amp;... __args)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename _Base::iterator __res = _Base::emplace(__position.base(),
&lt;br&gt;+				 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_Args&amp;gt;(__args)...);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return iterator(__res, this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;push_back(_Tp&amp;&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;@@ -238,22 +303,24 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, const _Tp&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, &amp;nbsp;__position-_Base::begin(), this-&amp;gt;size());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, __position.base() - _Base::begin(),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this-&amp;gt;size());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __old_size = this-&amp;gt;capacity();
&lt;br&gt;-	typename _Base::iterator __res = _Base::insert(__position,__x);
&lt;br&gt;+	typename _Base::iterator __res = _Base::insert(__position.base(), __x);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_resize(this, __old_size, this-&amp;gt;capacity());
&lt;br&gt;-	return __res;
&lt;br&gt;+	return iterator(__res, this);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, _Tp&amp;&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, &amp;nbsp;__position-_Base::begin(), this-&amp;gt;size());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, __position.base() - _Base::begin(),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this-&amp;gt;size());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __old_size = this-&amp;gt;capacity();
&lt;br&gt;-	typename _Base::iterator __res = _Base::insert(__position,__x);
&lt;br&gt;+	typename _Base::iterator __res = _Base::insert(__position.base(), __x);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_resize(this, __old_size, this-&amp;gt;capacity());
&lt;br&gt;-	return __res;
&lt;br&gt;+	return iterator(__res, this);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;@@ -262,8 +329,11 @@
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;-
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;swap(vector&amp;&amp; __x)
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;swap(vector&amp; __x)
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::swap(__x);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;@@ -272,9 +342,10 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, size_type __n, const _Tp&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, &amp;nbsp;__position-_Base::begin(), this-&amp;gt;size());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, __position.base() - _Base::begin(),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this-&amp;gt;size());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __old_size = this-&amp;gt;capacity();
&lt;br&gt;-	 &amp;nbsp; &amp;nbsp;_Base::insert(__position, __n, __x);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::insert(__position.base(), __n, __x);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_resize(this, __old_size, this-&amp;gt;capacity());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -283,12 +354,31 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _InputIterator __first, _InputIterator __last)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, &amp;nbsp;__position-_Base::begin(), this-&amp;gt;size());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_insert(this, __position.base()-_Base::begin(),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this-&amp;gt;size());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __old_size = this-&amp;gt;capacity();
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::insert(__position, __first, __last);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::insert(__position.base(), __first, __last);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_resize(this, __old_size, this-&amp;gt;capacity());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;erase(iterator __position)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+	typename _Base::iterator __res = _Base::erase(__position.base());
&lt;br&gt;+	return iterator(__res, this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;erase(iterator __first, iterator __last)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+	// _GLIBCXX_RESOLVE_LIB_DEFECTS
&lt;br&gt;+	// 151. can't currently clear() empty container
&lt;br&gt;+	typename _Base::iterator __res = _Base::erase(__first.base(),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__last.base());
&lt;br&gt;+	return iterator(__res, this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clear()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;@@ -297,17 +387,14 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::clear();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;// iterators:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;begin()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;inline void _M_profile_find() const 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _Base::begin(); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_find(this, size()); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;begin() const
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;inline void _M_profile_iterate(int __rewind = 0) const 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _Base::begin(); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_vector_iterate(this); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;private:
&lt;br&gt;@@ -362,6 +449,18 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;swap(vector&amp;lt;_Tp, _Alloc&amp;gt;&amp; __lhs, vector&amp;lt;_Tp, _Alloc&amp;gt;&amp; __rhs)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{ __lhs.swap(__rhs); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Tp, typename _Alloc&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;swap(vector&amp;lt;_Tp, _Alloc&amp;gt;&amp;&amp; __lhs, vector&amp;lt;_Tp, _Alloc&amp;gt;&amp; __rhs)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ __lhs.swap(__rhs); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Tp, typename _Alloc&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;swap(vector&amp;lt;_Tp, _Alloc&amp;gt;&amp; __lhs, vector&amp;lt;_Tp, _Alloc&amp;gt;&amp;&amp; __rhs)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ __lhs.swap(__rhs); }
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;} // namespace __profile
&lt;br&gt;&amp;nbsp; &amp;nbsp;using _GLIBCXX_STD_D::_S_word_bit;
&lt;br&gt;&amp;nbsp;} // namespace std
&lt;br&gt;Index: libstdc++-v3/include/profile/algo.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/algo.h	(revision 0)
&lt;br&gt;+++ libstdc++-v3/include/profile/algo.h	(revision 0)
&lt;br&gt;@@ -0,0 +1,93 @@
&lt;br&gt;+// -*- C++ -*-
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the terms
&lt;br&gt;+// of the GNU General Public License as published by the Free Software
&lt;br&gt;+// Foundation; either version 3, or (at your option) any later
&lt;br&gt;+// version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful, but
&lt;br&gt;+// WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU
&lt;br&gt;+// General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// Under Section 7 of GPL version 3, you are granted additional
&lt;br&gt;+// permissions described in the GCC Runtime Library Exception, version
&lt;br&gt;+// 3.1, as published by the Free Software Foundation.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License and
&lt;br&gt;+// a copy of the GCC Runtime Library Exception along with this program;
&lt;br&gt;+// see the files COPYING3 and COPYING.RUNTIME respectively. &amp;nbsp;If not, see
&lt;br&gt;+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+/** @file parallel/algo.h
&lt;br&gt;+ * &amp;nbsp;@brief Parallel STL function calls corresponding to the stl_algo.h header.
&lt;br&gt;+ *
&lt;br&gt;+ * &amp;nbsp;The functions defined here mainly do case switches and
&lt;br&gt;+ * &amp;nbsp;call the actual parallelized versions in other files.
&lt;br&gt;+ * &amp;nbsp;Inlining policy: Functions that basically only contain one function call,
&lt;br&gt;+ * &amp;nbsp;are declared inline.
&lt;br&gt;+ * &amp;nbsp;This file is a GNU parallel extension to the Standard C++ Library.
&lt;br&gt;+ */
&lt;br&gt;+
&lt;br&gt;+#ifndef _GLIBCXX_PROFILE_ALGO_H
&lt;br&gt;+#define _GLIBCXX_PROFILE_ALGO_H 1
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;bits/stl_algo.h&amp;gt;
&lt;br&gt;+#include &amp;lt;profile/base.h&amp;gt;
&lt;br&gt;+#include &amp;lt;profile/iterator_tracker.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+namespace std
&lt;br&gt;+{
&lt;br&gt;+namespace __profile
&lt;br&gt;+{
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Tp&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;struct __is_iterator_tracker
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;enum { __value = 0 };
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef __false_type __type;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;};
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Iterator, typename _Container&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;struct __is_iterator_tracker&amp;lt;__iterator_tracker&amp;lt;_Iterator, _Container&amp;gt; &amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;enum { __value = 1 };
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef __true_type __type;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;};
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _IIter, typename _Tp&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline _IIter
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;find(_IIter __begin, _IIter __end, const _Tp&amp; __val)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename __is_iterator_tracker&amp;lt;_IIter&amp;gt;::__type _IterTracker;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;return __cxxprof_find(__begin, __end, __val, _IterTracker());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _IIter, typename _Tp&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline _IIter 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__cxxprof_find( _IIter __begin, _IIter __end, const _Tp&amp; __val,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__false_type)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;return _GLIBCXX_STD_ALGO::find(__begin, __end, __val);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _IterTracker, typename _Tp&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline _IterTracker 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;__cxxprof_find( _IterTracker __begin, _IterTracker __end, const _Tp&amp; __val,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__true_type)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__begin._M_find();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typename _IterTracker::_Base_iterator __res = 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_GLIBCXX_STD_ALGO::find(__begin.base(), __end.base(), __val);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;return _IterTracker(__res, __begin._M_get_sequence());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+} // end namespace __profile
&lt;br&gt;+} // end namespace std
&lt;br&gt;+
&lt;br&gt;+#endif
&lt;br&gt;Index: libstdc++-v3/include/profile/list
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/profile/list	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/profile/list	(working copy)
&lt;br&gt;@@ -30,13 +30,15 @@
&lt;br&gt;&amp;nbsp;#define _GLIBCXX_PROFILE_LIST 1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;list&amp;gt;
&lt;br&gt;+#include &amp;lt;profile/base.h&amp;gt; 
&lt;br&gt;+#include &amp;lt;profile/iterator_tracker.h&amp;gt; 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;namespace std
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp;namespace __profile
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;/** @brief List wrapper with performance instrumentation. &amp;nbsp;*/
&lt;br&gt;- &amp;nbsp;template&amp;lt;typename _Tp, typename _Allocator = std::allocator&amp;lt;_Tp&amp;gt; &amp;gt;
&lt;br&gt;+template&amp;lt;typename _Tp, typename _Allocator = std::allocator&amp;lt;_Tp&amp;gt; &amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;class list
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;: public _GLIBCXX_STD_D::list&amp;lt;_Tp, _Allocator&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;@@ -46,8 +48,10 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::reference &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reference;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::const_reference &amp;nbsp; &amp;nbsp; &amp;nbsp; const_reference;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::iterator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::const_iterator &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef __iterator_tracker&amp;lt;typename _Base::iterator, list&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;+				 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef __iterator_tracker&amp;lt;typename _Base::const_iterator, list&amp;gt; &amp;nbsp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::size_type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size_type;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef typename _Base::difference_type &amp;nbsp; &amp;nbsp; &amp;nbsp; difference_type;
&lt;br&gt;@@ -61,36 +65,68 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 23.2.2.1 construct/copy/destroy:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit list(const _Allocator&amp; __a = _Allocator())
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__a) { }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__a) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct(this); 	// list2slist
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct2(this); 	// list2vector
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct3(this); 	// list2set
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit list(size_type __n, const _Tp&amp; __value = _Tp(),
&lt;br&gt;&amp;nbsp;		 &amp;nbsp; &amp;nbsp;const _Allocator&amp; __a = _Allocator())
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__n, __value, __a) { }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__n, __value, __a) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct2(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct3(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;class _InputIterator&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;list(_InputIterator __first, _InputIterator __last,
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; const _Allocator&amp; __a = _Allocator())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__first, __last, __a)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{	 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct2(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct3(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;list(const list&amp; __x)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__x) { }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__x) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct2(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct3(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;list(const _Base&amp; __x)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__x) { }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__x) 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 	
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct2(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct3(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;list(list&amp;&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(std::forward&amp;lt;list&amp;gt;(__x))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct2(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_construct3(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;list(initializer_list&amp;lt;value_type&amp;gt; __l,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const allocator_type&amp; __a = allocator_type())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: _Base(__l, __a) { }
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;~list() { }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;~list() { 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_destruct(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_destruct2(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_destruct3(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;list&amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;operator=(const list&amp; __x)
&lt;br&gt;@@ -141,27 +177,39 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// iterators:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;begin()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return iterator(_Base::begin()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return iterator(_Base::begin(), this); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;begin() const
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::begin()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::begin(), this); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return iterator(_Base::end()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return iterator(_Base::end(), this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;end() const
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::end()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return const_iterator(_Base::end(), this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reverse_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rbegin()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return reverse_iterator(end()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return reverse_iterator(end());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reverse_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rbegin() const
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_reverse_iterator(end()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return const_reverse_iterator(end());
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reverse_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rend()
&lt;br&gt;@@ -174,11 +222,11 @@
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cbegin() const
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::begin()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::begin(), this); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cend() const
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::end()); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return const_iterator(_Base::end(), this); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reverse_iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;crbegin() const
&lt;br&gt;@@ -216,17 +264,25 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reference
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;back()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;&amp;nbsp;	return _Base::back();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const_reference
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;back() const
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;&amp;nbsp;	return _Base::back();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 23.2.2.3 modifiers:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;using _Base::push_front;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;push_front(const value_type&amp; __x)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_invalid_operator(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::push_front(__x);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using _Base::emplace_front;
&lt;br&gt;@@ -235,7 +291,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pop_front()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;-	iterator __victim = begin();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;&amp;nbsp;	_Base::pop_front();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -251,6 +307,7 @@
&lt;br&gt;&amp;nbsp;	iterator __victim = end();
&lt;br&gt;&amp;nbsp;	--__victim;
&lt;br&gt;&amp;nbsp;	_Base::pop_back();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;@@ -258,21 +315,29 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;emplace(iterator __position, _Args&amp;&amp;... __args)
&lt;br&gt;&amp;nbsp;	{
&lt;br&gt;-	 &amp;nbsp;return iterator(_Base::emplace(__position,
&lt;br&gt;-					std::forward&amp;lt;_Args&amp;gt;(__args)...));
&lt;br&gt;+	 &amp;nbsp;return iterator(_Base::emplace(__position.base(),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::forward&amp;lt;_Args&amp;gt;(__args)...));
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, const _Tp&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;-	return iterator(_Base::insert(__position, __x));
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __size = size();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_insert(this, __position, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_insert3(this, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return iterator(_Base::insert(__position.base(), __x), this);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, _Tp&amp;&amp; __x)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return emplace(__position, std::move(__x)); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __size = size();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_insert(this, __position, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_insert3(this, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return emplace(__position.base(), std::move(__x)); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __p, initializer_list&amp;lt;value_type&amp;gt; __l)
&lt;br&gt;@@ -284,21 +349,27 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, size_type __n, const _Tp&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;-	_Base::insert(__position, __n, __x);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __size = size();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_insert(this, __position, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_insert3(this, __size, __n);
&lt;br&gt;+	_Base::insert(__position.base(), __n, __x);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;class _InputIterator&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insert(iterator __position, _InputIterator __first,
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp; _InputIterator __last)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;-	 &amp;nbsp;_Base::insert(__position, __first, __last);
&lt;br&gt;-	}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __size = size();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_profile_insert(this, __position, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Base::insert(__position.base(), __first, __last);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_insert3(this, __size, size() - __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;erase(iterator __position)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;-	return iterator(_Base::erase(__position));
&lt;br&gt;+	return iterator(_Base::erase(__position.base()), this);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iterator
&lt;br&gt;@@ -306,7 +377,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp;	// _GLIBCXX_RESOLVE_LIB_DEFECTS
&lt;br&gt;&amp;nbsp;	// 151. can't currently clear() empty container
&lt;br&gt;-	return iterator(_Base::erase(__position, __last));
&lt;br&gt;+	return iterator(_Base::erase(__position.base(), __last.base()), this);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;@@ -329,7 +400,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;splice(iterator __position, list&amp; __x)
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;-	this-&amp;gt;splice(__position, _GLIBCXX_MOVE(__x), __x.begin(), __x.end());
&lt;br&gt;+	this-&amp;gt;splice(__position.base(), _GLIBCXX_MOVE(__x), __x.begin(), __x.end());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;@@ -343,8 +414,8 @@
&lt;br&gt;&amp;nbsp;	// after implementing the relevant bits of N1599.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	// _GLIBCXX_RESOLVE_LIB_DEFECTS
&lt;br&gt;-	_Base::splice(__position, _GLIBCXX_MOVE(__x._M_base()),
&lt;br&gt;-		 &amp;nbsp; &amp;nbsp; &amp;nbsp;__i);
&lt;br&gt;+	_Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp; &amp;nbsp;__i.base());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;@@ -359,8 +430,8 @@
&lt;br&gt;&amp;nbsp;	// We used to perform the splice_alloc check: &amp;nbsp;not anymore, redundant
&lt;br&gt;&amp;nbsp;	// after implementing the relevant bits of N1599.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-	_Base::splice(__position, _GLIBCXX_MOVE(__x._M_base()),
&lt;br&gt;-		 &amp;nbsp; &amp;nbsp; &amp;nbsp;__first, __last);
&lt;br&gt;+	_Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp; &amp;nbsp;__first.base(), __last.base());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;@@ -381,6 +452,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;for (iterator __x = begin(); __x != _Base::end(); )
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;if (__pred(*__x))
&lt;br&gt;&amp;nbsp;		__x = erase(__x);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;@@ -398,6 +470,7 @@
&lt;br&gt;&amp;nbsp;	iterator __next = __first;
&lt;br&gt;&amp;nbsp;	while (++__next != __last)
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;if (*__first == *__next)
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;erase(__next);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;else
&lt;br&gt;@@ -417,6 +490,7 @@
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;iterator __next = __first;
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;while (++__next != __last)
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;if (__binary_pred(*__first, *__next))
&lt;br&gt;&amp;nbsp;		erase(__next);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;@@ -471,6 +545,30 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const _Base&amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_base() const { return *this; }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;inline void _M_profile_find() const 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_find3(this, size()); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;inline void _M_profile_iterate(int __rewind = 0) const 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_iterate(this); 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (__rewind)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;private:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type _M_profile_insert(void* obj, iterator __pos, size_type __size)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size_type __shift = 0;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename _Base::iterator __it = __pos.base();
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for ( ; __it!=_Base::end(); __it++)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__shift++;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_rewind(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_operation(this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__profcxx_list_insert(this, __shift, __size);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;typename _Tp, typename _Alloc&amp;gt;
&lt;br&gt;Index: libstdc++-v3/include/bits/stl_algo.h
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/bits/stl_algo.h	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/bits/stl_algo.h	(working copy)
&lt;br&gt;@@ -4278,6 +4278,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return __f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#if &amp;nbsp;!defined(_GLIBCXX_PROFILE) &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief Find the first occurrence of a value in a sequence.
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;@ingroup non_mutating_algorithms
&lt;br&gt;@@ -4300,6 +4301,7 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return std::__find(__first, __last, __val,
&lt;br&gt;&amp;nbsp;		 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::__iterator_category(__first));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief Find the first element in a sequence for which a
&lt;br&gt;@@ -6164,4 +6166,41 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;_GLIBCXX_END_NESTED_NAMESPACE
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#if defined(_GLIBCXX_PROFILE) 
&lt;br&gt;+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_ALGO)
&lt;br&gt;+
&lt;br&gt;+	// TODO: instrument find_somthing like a find_end
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@brief Find the first occurrence of a value in a sequence.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@ingroup non_mutating_algorithms
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@param &amp;nbsp;first &amp;nbsp;An input iterator.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@param &amp;nbsp;last &amp;nbsp; An input iterator.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@param &amp;nbsp;val &amp;nbsp; &amp;nbsp;The value to find.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@return &amp;nbsp; The first iterator @c i in the range @p [first,last)
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;such that @c *i == @p val, or @p last if no such iterator exists.
&lt;br&gt;+ &amp;nbsp;*/
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _InputIterator, typename _Tp&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline _InputIterator
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;find(_InputIterator __first, _InputIterator __last,
&lt;br&gt;+	 const _Tp&amp; __val)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; // concept requirements
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__glibcxx_function_requires(_InputIteratorConcept&amp;lt;_InputIterator&amp;gt;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__glibcxx_function_requires(_EqualOpConcept&amp;lt;
&lt;br&gt;+		typename iterator_traits&amp;lt;_InputIterator&amp;gt;::value_type, _Tp&amp;gt;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;__glibcxx_requires_valid_range(__first, __last);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;return std::__find(__first, __last, __val,
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::__iterator_category(__first));
&lt;br&gt;+ 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ 
&lt;br&gt;+_GLIBCXX_END_NESTED_NAMESPACE
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;#endif /* _STL_ALGO_H */
&lt;br&gt;Index: libstdc++-v3/include/bits/c++config
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/bits/c++config	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/bits/c++config	(working copy)
&lt;br&gt;@@ -165,10 +165,19 @@
&lt;br&gt;&amp;nbsp;# &amp;nbsp; error Cannot use -D_GLIBCXX_PROFILE with -D_GLIBCXX_DEBUG or \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-D_GLIBCXX_PARALLEL
&lt;br&gt;&amp;nbsp;# &amp;nbsp;endif
&lt;br&gt;+
&lt;br&gt;+# &amp;nbsp;define _GLIBCXX_STD_P __profile
&lt;br&gt;+
&lt;br&gt;+// The original algorithm functions are hidden and existing in the following
&lt;br&gt;+// namespace. Now, user program sees the wrapper functions in the '__profile'
&lt;br&gt;+// namespace.
&lt;br&gt;+# &amp;nbsp;define _GLIBCXX_STD_ALGO __profile_algo
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;# &amp;nbsp;define _GLIBCXX_STD_D __norm
&lt;br&gt;-# &amp;nbsp;define _GLIBCXX_STD_P _GLIBCXX_STD
&lt;br&gt;&amp;nbsp;# &amp;nbsp;define _GLIBCXX_STD_PR __norm
&lt;br&gt;-# &amp;nbsp;define _GLIBCXX_STD __cxx1998
&lt;br&gt;+// This namespace is no longer necessary
&lt;br&gt;+//# &amp;nbsp;define _GLIBCXX_STD __cxx1998
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;# &amp;nbsp;define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { 
&lt;br&gt;&amp;nbsp;# &amp;nbsp;define _GLIBCXX_END_NAMESPACE }
&lt;br&gt;&amp;nbsp;# endif
&lt;br&gt;Index: libstdc++-v3/include/Makefile.am
&lt;br&gt;===================================================================
&lt;br&gt;--- libstdc++-v3/include/Makefile.am	(revision 155023)
&lt;br&gt;+++ libstdc++-v3/include/Makefile.am	(working copy)
&lt;br&gt;@@ -781,6 +781,9 @@
&lt;br&gt;&amp;nbsp;profile_srcdir = ${glibcxx_srcdir}/include/profile
&lt;br&gt;&amp;nbsp;profile_builddir = ./profile
&lt;br&gt;&amp;nbsp;profile_headers = \
&lt;br&gt;+	${profile_srcdir}/algo.h \
&lt;br&gt;+	${profile_srcdir}/algorithm \
&lt;br&gt;+	${profile_srcdir}/iterator_tracker.h \
&lt;br&gt;&amp;nbsp;	${profile_srcdir}/base.h \
&lt;br&gt;&amp;nbsp;	${profile_srcdir}/unordered_map \
&lt;br&gt;&amp;nbsp;	${profile_srcdir}/unordered_set \
&lt;br&gt;@@ -807,7 +810,10 @@
&lt;br&gt;&amp;nbsp;	${profile_impl_srcdir}/profiler_state.h \
&lt;br&gt;&amp;nbsp;	${profile_impl_srcdir}/profiler_trace.h \
&lt;br&gt;&amp;nbsp;	${profile_impl_srcdir}/profiler_vector_size.h \
&lt;br&gt;-	${profile_impl_srcdir}/profiler_vector_to_list.h
&lt;br&gt;+	${profile_impl_srcdir}/profiler_vector_to_list.h \
&lt;br&gt;+	${profile_impl_srcdir}/profiler_list_to_slist.h \
&lt;br&gt;+	${profile_impl_srcdir}/profiler_list_to_vector.h \
&lt;br&gt;+	${profile_impl_srcdir}/profiler_list_to_set.h 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;# Some of the different &amp;quot;C&amp;quot; header models need extra files.
&lt;br&gt;&amp;nbsp;# Some &amp;quot;C&amp;quot; header schemes require the &amp;quot;C&amp;quot; compatibility headers.
&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-profile-stdlib--PATCH%3A-Add-three-diagnostics-and-implement-cost--%09factor-parameterization-tp26672081p26672081.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26647294</id>
	<title>Re: [FYI] ChangeLogs cleaned-up a bit</title>
	<published>2009-12-04T10:46:49Z</published>
	<updated>2009-12-04T10:46:49Z</updated>
	<author>
		<name>Benjamin Kosnik</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; in my HJ Lu-ish mood, I removed quite a few spurious white spaces and
&lt;br&gt;&amp;gt; tabs lurking in our ChangeLogs files, actually quite annoying in a new
&lt;br&gt;&amp;gt; emacs setup I'm using now (they are all displayed bright red)...
&lt;br&gt;&lt;br&gt;Thanks, had been tempted myself. It is now very distracting!
&lt;br&gt;&lt;br&gt;-benjamin
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-FYI--ChangeLogs-cleaned-up-a-bit-tp26645239p26647294.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26645239</id>
	<title>[FYI] ChangeLogs cleaned-up a bit</title>
	<published>2009-12-04T08:35:05Z</published>
	<updated>2009-12-04T08:35:05Z</updated>
	<author>
		<name>Paolo Carlini-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;in my HJ Lu-ish mood, I removed quite a few spurious white spaces and
&lt;br&gt;tabs lurking in our ChangeLogs files, actually quite annoying in a new
&lt;br&gt;emacs setup I'm using now (they are all displayed bright red)...
&lt;br&gt;&lt;br&gt;Paolo.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-FYI--ChangeLogs-cleaned-up-a-bit-tp26645239p26645239.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26626703</id>
	<title>[v3] Fix libstdc++/42261</title>
	<published>2009-12-03T06:21:59Z</published>
	<updated>2009-12-03T06:21:59Z</updated>
	<author>
		<name>Paolo Carlini-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;tested x86_64-linux, committed to mainline.
&lt;br&gt;&lt;br&gt;Paolo.
&lt;br&gt;&lt;br&gt;///////////////////////
&lt;br&gt;&lt;br /&gt;2009-12-03 &amp;nbsp;Paolo Carlini &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26626703&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;paolo.carlini@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PR libstdc++/42261
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/bits/basic_string.h (_S_construct_aux(_Integer, _Integer,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const _Alloc&amp;, __true_type)): Cast the second argument to value_type.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/ext/sso_string_base.h (_M_construct_aux(_Integer, _Integer,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; std::__true_type)): Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/ext/rc_string_base.h (_S_construct_aux(_Integer, _Integer,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const _Alloc&amp;, std::__true_type)): Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/21_strings/basic_string/cons/char/42261.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/21_strings/basic_string/cons/wchar_t/42261.cc: Likewise.
&lt;br&gt;&lt;br /&gt;Index: include/ext/rc_string_base.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/ext/rc_string_base.h	(revision 154941)
&lt;br&gt;+++ include/ext/rc_string_base.h	(working copy)
&lt;br&gt;@@ -231,7 +231,8 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _CharT*
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_S_construct_aux(_Integer __beg, _Integer __end,
&lt;br&gt;&amp;nbsp;			 const _Alloc&amp; __a, std::__true_type)
&lt;br&gt;-	{ return _S_construct(static_cast&amp;lt;size_type&amp;gt;(__beg), __end, __a); }
&lt;br&gt;+	{ return _S_construct(static_cast&amp;lt;size_type&amp;gt;(__beg),
&lt;br&gt;+			 &amp;nbsp; &amp;nbsp; &amp;nbsp;static_cast&amp;lt;value_type&amp;gt;(__end), __a); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _InIterator&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _CharT*
&lt;br&gt;Index: include/ext/sso_string_base.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/ext/sso_string_base.h	(revision 154941)
&lt;br&gt;+++ include/ext/sso_string_base.h	(working copy)
&lt;br&gt;@@ -106,7 +106,8 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Integer&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_construct_aux(_Integer __beg, _Integer __end, std::__true_type)
&lt;br&gt;-	{ _M_construct(static_cast&amp;lt;size_type&amp;gt;(__beg), __end); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{ _M_construct(static_cast&amp;lt;size_type&amp;gt;(__beg),
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp; static_cast&amp;lt;value_type&amp;gt;(__end)); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _InIterator&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;Index: include/bits/basic_string.h
&lt;br&gt;===================================================================
&lt;br&gt;--- include/bits/basic_string.h	(revision 154941)
&lt;br&gt;+++ include/bits/basic_string.h	(working copy)
&lt;br&gt;@@ -1588,7 +1588,8 @@
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _CharT*
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_S_construct_aux(_Integer __beg, _Integer __end,
&lt;br&gt;&amp;nbsp;			 const _Alloc&amp; __a, __true_type)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return _S_construct(static_cast&amp;lt;size_type&amp;gt;(__beg), __end, __a); }
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ return _S_construct(static_cast&amp;lt;size_type&amp;gt;(__beg),
&lt;br&gt;+			 &amp;nbsp; &amp;nbsp; &amp;nbsp;static_cast&amp;lt;value_type&amp;gt;(__end), __a); }
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;class _InIterator&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _CharT*
&lt;br&gt;Index: testsuite/21_strings/basic_string/cons/wchar_t/42261.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/21_strings/basic_string/cons/wchar_t/42261.cc	(revision 0)
&lt;br&gt;+++ testsuite/21_strings/basic_string/cons/wchar_t/42261.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,35 @@
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;string&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+// libstdc++/42261
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+ &amp;nbsp;using namespace std;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;const wstring s(wstring::size_type(6), wstring::size_type(L'f'));
&lt;br&gt;+ &amp;nbsp;VERIFY( s == L&amp;quot;ffffff&amp;quot; );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/21_strings/basic_string/cons/char/42261.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/21_strings/basic_string/cons/char/42261.cc	(revision 0)
&lt;br&gt;+++ testsuite/21_strings/basic_string/cons/char/42261.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,35 @@
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;string&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+// libstdc++/42261
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+ &amp;nbsp;using namespace std;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;const string s(string::size_type(6), string::size_type('f'));
&lt;br&gt;+ &amp;nbsp;VERIFY( s == &amp;quot;ffffff&amp;quot; );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-v3--Fix-libstdc%2B%2B-42261-tp26626703p26626703.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26623724</id>
	<title>[v3] Add some std::bind tests</title>
	<published>2009-12-03T02:19:57Z</published>
	<updated>2009-12-03T02:19:57Z</updated>
	<author>
		<name>Paolo Carlini-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;checked x86-64-linux, committed to mainline.
&lt;br&gt;&lt;br&gt;Paolo.
&lt;br&gt;&lt;br&gt;////////////////////
&lt;br&gt;&lt;br /&gt;2009-12-03 &amp;nbsp;Paolo Carlini &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26623724&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;paolo.carlini@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/bind/ref.cc: Add.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/bind/all_bound.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/bind/nested.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/bind/placeholders.cc: Likewise.
&lt;br&gt;&lt;br /&gt;Index: testsuite/20_util/bind/ref.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/bind/ref.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/bind/ref.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,55 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.11 Function template bind
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+struct X
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;X() : bar(17) {}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int foo(int x, int y) { return bar + x + y; }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int bar;
&lt;br&gt;+
&lt;br&gt;+private:
&lt;br&gt;+ &amp;nbsp;X(const X&amp;);
&lt;br&gt;+ &amp;nbsp;X&amp; operator=(const X&amp;);
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+// Operations on empty function&amp;lt;&amp;gt; objects
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+ &amp;nbsp;using std::bind;
&lt;br&gt;+ &amp;nbsp;using std::ref;
&lt;br&gt;+ &amp;nbsp;::X x;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;VERIFY( bind(&amp;::X::foo, ref(x), 1, 2)() == 20 );
&lt;br&gt;+ &amp;nbsp;VERIFY( bind&amp;lt;int&amp;gt;(&amp;::X::foo, ref(x), 1, 2)() == 20 );
&lt;br&gt;+ &amp;nbsp;VERIFY( bind(&amp;::X::bar, ref(x))() == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( bind&amp;lt;int&amp;gt;(&amp;::X::bar, ref(x))() == 17 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/bind/all_bound.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/bind/all_bound.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/bind/all_bound.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,39 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.11 Function template bind
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+// Operations on empty function&amp;lt;&amp;gt; objects
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind(std::plus&amp;lt;int&amp;gt;(), 3, 5)() == 8 );
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind(std::minus&amp;lt;int&amp;gt;(), 3, 5)() == -2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind&amp;lt;int&amp;gt;(std::plus&amp;lt;int&amp;gt;(), 3, 5)() == 8 );
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind&amp;lt;int&amp;gt;(std::minus&amp;lt;int&amp;gt;(), 3, 5)() == -2 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/bind/nested.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/bind/nested.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/bind/nested.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,42 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.11 Function template bind
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+// Operations on empty function&amp;lt;&amp;gt; objects
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+ &amp;nbsp;using namespace std::placeholders;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int five = 5;
&lt;br&gt;+ &amp;nbsp;int seven = 7;
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind(std::multiplies&amp;lt;int&amp;gt;(), _1,
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp;std::bind(std::minus&amp;lt;int&amp;gt;(), 6, _2))(five, seven) == -5 );
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind(std::multiplies&amp;lt;int&amp;gt;(), _1,
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp;std::bind(std::minus&amp;lt;int&amp;gt;(), 6, _2))(seven, five) == 7 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/bind/placeholders.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/bind/placeholders.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/bind/placeholders.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,40 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.11 Function template bind
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+// Operations on empty function&amp;lt;&amp;gt; objects
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+ &amp;nbsp;using namespace std::placeholders;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int five = 5;
&lt;br&gt;+ &amp;nbsp;int seven = 7;
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind(std::minus&amp;lt;int&amp;gt;(), _1, _2)(five, seven) == -2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( std::bind(std::minus&amp;lt;int&amp;gt;(), _2, _1)(five, seven) == 2 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-v3--Add-some-std%3A%3Abind-tests-tp26623724p26623724.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26621700</id>
	<title>Committed: Fix ext/profile/mutex_extensions.cc regression</title>
	<published>2009-12-02T22:44:48Z</published>
	<updated>2009-12-02T22:44:48Z</updated>
	<author>
		<name>Hans-Peter Nilsson</name>
	</author>
	<content type="html">In r154852:154860, there was a change shifting the
&lt;br&gt;libstdc++-v3/include/bits/c++config line-numbers, causing this
&lt;br&gt;test to fail since then on all platforms; see gcc-testresults@.
&lt;br&gt;I'm not sure how regression was missed in testing (other than
&lt;br&gt;perhaps a missing run on a _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
&lt;br&gt;platform), but either way, the trivial fix just committed was:
&lt;br&gt;&lt;br&gt;libstdc++-v3:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/ext/profile/mutex_extensions.cc: Adjust dg-error line
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; number.
&lt;br&gt;&lt;br&gt;Index: testsuite/ext/profile/mutex_extensions.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/ext/profile/mutex_extensions.cc	(revision 154935)
&lt;br&gt;+++ testsuite/ext/profile/mutex_extensions.cc	(working copy)
&lt;br&gt;@@ -22,5 +22,5 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#include &amp;lt;vector&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-// { dg-error &amp;quot;Cannot use -D_GLIBCXX_PROFILE with &amp;quot; &amp;quot;&amp;quot; { target *-*-* } 165 }
&lt;br&gt;+// { dg-error &amp;quot;Cannot use -D_GLIBCXX_PROFILE with &amp;quot; &amp;quot;&amp;quot; { target *-*-* } 167 }
&lt;br&gt;&amp;nbsp;// { dg-excess-errors &amp;quot;In file included from&amp;quot; }
&lt;br&gt;&lt;br&gt;brgds, H-P
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Committed%3A-Fix-ext-profile-mutex_extensions.cc-regression-tp26621700p26621700.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26593318</id>
	<title>Re: [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without  virtual bases (PR c++/3187, take 3)</title>
	<published>2009-12-01T07:05:22Z</published>
	<updated>2009-12-01T07:05:22Z</updated>
	<author>
		<name>Jason Merrill</name>
	</author>
	<content type="html">On 12/01/2009 02:45 AM, Jakub Jelinek wrote:
&lt;br&gt;&amp;gt; On Mon, Nov 30, 2009 at 10:46:31PM -0500, Jason Merrill wrote:
&lt;br&gt;&amp;gt;&amp;gt; On 11/30/2009 05:36 PM, Jakub Jelinek wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 	* config/abi/pre/gnu.ver: Don't export certain base dtors that
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 	weren't previously exported.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is this necessary?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes.
&lt;br&gt;&lt;br&gt;OK.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; +	&amp;&amp; &amp;nbsp;(SUPPORTS_ONE_ONLY || !DECL_WEAK (fns[0]))
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This test seems unnecessary; I don't see the problem with using aliases
&lt;br&gt;&amp;gt;&amp;gt; on targets with weak symbols but no one-only support.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is to fix AIX (and is actually unrelated to this patch, it can be dealt
&lt;br&gt;&amp;gt; with separately). &amp;nbsp;In theory it should work well, but David Edelsohn
&lt;br&gt;&amp;gt; reported that some symbols were missing from libstdc++.so without it. &amp;nbsp;I
&lt;br&gt;&amp;gt; have no access to AIX and have no idea what AIX linker is doing with the
&lt;br&gt;&amp;gt; symbols.
&lt;/div&gt;&lt;br&gt;OK.
&lt;br&gt;&lt;br&gt;The patch is OK.
&lt;br&gt;&lt;br&gt;Jason
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A--C%2B%2B-PATCH--Optimize-C%2B%2B-comdat-ctors-dtors-in-classes-without-virtual-bases-%28PR-c%2B%2B-3187%2C-take-3%29-tp26587801p26593318.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26587801</id>
	<title>Re: [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3)</title>
	<published>2009-11-30T23:45:26Z</published>
	<updated>2009-11-30T23:45:26Z</updated>
	<author>
		<name>Jakub Jelinek</name>
	</author>
	<content type="html">On Mon, Nov 30, 2009 at 10:46:31PM -0500, Jason Merrill wrote:
&lt;br&gt;&amp;gt; On 11/30/2009 05:36 PM, Jakub Jelinek wrote:
&lt;br&gt;&amp;gt; &amp;gt;	* config/abi/pre/gnu.ver: Don't export certain base dtors that
&lt;br&gt;&amp;gt; &amp;gt;	weren't previously exported.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is this necessary? &amp;nbsp;I thought it was OK to add new exported symbols, but 
&lt;br&gt;&amp;gt; you'd know better than I.
&lt;br&gt;&lt;br&gt;Yes. &amp;nbsp;We definitely must not export them with the old symbol versions where
&lt;br&gt;they have not been exported before (GLIBCXX_3.4 and GLIBCXX_3.4.10).
&lt;br&gt;We could export them at @@GLIBCXX_3.4.14 (which would mean the same gnu.ver
&lt;br&gt;changes and mentioning the D2 symbols in GLIBCXX_3.4.14 section), but that
&lt;br&gt;has a problem that we only emit those D2 symbols when HAVE_COMDAT_GROUP, so
&lt;br&gt;in !HAVE_COMDAT_GROUP configurations the exported list would be different.
&lt;br&gt;I have no idea how to force generation of those symbols otherwise so that
&lt;br&gt;they are exported on all targets.
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;+	 &amp;nbsp;&amp;&amp; (SUPPORTS_ONE_ONLY || !DECL_WEAK (fns[0]))
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This test seems unnecessary; I don't see the problem with using aliases 
&lt;br&gt;&amp;gt; on targets with weak symbols but no one-only support.
&lt;br&gt;&lt;br&gt;This is to fix AIX (and is actually unrelated to this patch, it can be dealt
&lt;br&gt;with separately). &amp;nbsp;In theory it should work well, but David Edelsohn
&lt;br&gt;reported that some symbols were missing from libstdc++.so without it. &amp;nbsp;I
&lt;br&gt;have no access to AIX and have no idea what AIX linker is doing with the
&lt;br&gt;symbols. &amp;nbsp;!SUPPORTS_ONE_ONLY targets don't have DECL_ONE_ONLY, but instead
&lt;br&gt;just use DECL_WEAK symbols, so I thought when we don't do this optimization
&lt;br&gt;on !HAVE_COMDAT_GROUP SUPPORTS_ONE_ONLY targets for comdat and comdat-like
&lt;br&gt;symbols, the world wouldn't end if we didn't support it even on the
&lt;br&gt;far rarer !HAVE_COMDAT_GROUP !SUPPORTS_ONE_ONLY targets.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jakub
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A--C%2B%2B-PATCH--Optimize-C%2B%2B-comdat-ctors-dtors-in-classes-without-virtual-bases-%28PR-c%2B%2B-3187%2C-take-3%29-tp26587801p26587801.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26582380</id>
	<title>Re: how to get read/write access for profile extension contributor</title>
	<published>2009-11-30T13:37:22Z</published>
	<updated>2009-11-30T13:37:22Z</updated>
	<author>
		<name>Silvius Rus</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 4:49 PM, Benjamin Kosnik &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26582380&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bkoz@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; But the general guideline for write access to the SVN tree is
&lt;br&gt;&amp;gt; &amp;gt; successful submission of a couple of patches.  That ensures that the
&lt;br&gt;&amp;gt; &amp;gt; contributor understands gcc's submission and commit policy to at least
&lt;br&gt;&amp;gt; &amp;gt; a minimal degree.  Write access is a powerful tool, since we must
&lt;br&gt;&amp;gt; &amp;gt; essentially trust everybody with write access, so the gcc maintainers
&lt;br&gt;&amp;gt; &amp;gt; don't normally give it out on spec.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yep.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Let's try to work the kinks out with the first couple of patches,
&lt;br&gt;&amp;gt; and then when everything looks good after a bit re-discuss.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -benjamin
&lt;/div&gt;&lt;br&gt;Sounds good. &amp;nbsp;I was just a bit confused about the mechanics of
&lt;br&gt;branches vs trunk. &amp;nbsp;It's clear now.
&lt;br&gt;&lt;br&gt;I am working with Changhee offline and he will send out a patch for
&lt;br&gt;discussion very soon.
&lt;br&gt;&lt;br&gt;Thank you, Ian and Benjamin,
&lt;br&gt;Silvius
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-read-write-access-for-profile-extension-contributor-tp26524681p26582380.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26581066</id>
	<title>Re: Libstdc++ as DLL on windows, alternative approach [was Re: cygwin  patch review]</title>
	<published>2009-11-30T12:13:18Z</published>
	<updated>2009-11-30T12:13:18Z</updated>
	<author>
		<name>Dave Korn-6</name>
	</author>
	<content type="html">Dave Korn wrote:
&lt;br&gt;&amp;gt; [snip]
&lt;br&gt;&lt;br&gt;&amp;nbsp; YA test results:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg02971.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg02971.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; Owing to imminent end of stage I guess I'll just have to check it in without
&lt;br&gt;this part for which I haven't been able to get review in time:
&lt;br&gt;&lt;br&gt;&amp;gt; 	* gcc.c (LINK_COMMAND_SPEC): Allow and ignore -static-libstdc++
&lt;br&gt;&amp;gt; 	similarly to -static.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; gcc/cp/ChangeLog:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	* g++spec.c (SKIPOPT): Delete.
&lt;br&gt;&amp;gt; 	(lang_specific_driver): Do not skip -static-libstdc++ option.
&lt;br&gt;&lt;br&gt;&amp;nbsp; The end result won't be broken, the remaining parts of the patch will stand
&lt;br&gt;alone, but it will lead to statically linked c++ code needlessly indirecting
&lt;br&gt;through the cygwin dll malloc wrappers when it doesn't have to. &amp;nbsp;That's a
&lt;br&gt;small inefficiency that can be solved whenever the patch can be approved.
&lt;br&gt;It's also eminently suitable to go in as a separate patch anyway, since it
&lt;br&gt;helps fix someone else's PR too.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; DaveK
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cygwin-patch-review-tp25961305p26581066.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26571726</id>
	<title>Re: [C++0x] add rvalue support to std::function</title>
	<published>2009-11-30T01:37:25Z</published>
	<updated>2009-11-30T01:37:25Z</updated>
	<author>
		<name>Paolo Carlini-3</name>
	</author>
	<content type="html">On 11/30/2009 09:42 AM, Jonathan Wakely wrote:
&lt;br&gt;&amp;gt; OK, thanks, Paolo. &amp;nbsp;I'll continue working on the other bits later today.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Done with the below.
&lt;br&gt;&lt;br&gt;I'll try to make progress on the Segmentation fault, I wonder if it's
&lt;br&gt;really a new problem, I can see in Bugzilla a few Seg faults... Anyway,
&lt;br&gt;just as a minor additional data point, Seg faults even without declval...
&lt;br&gt;&lt;br&gt;Paolo.
&lt;br&gt;&lt;br&gt;////////////////
&lt;br&gt;&lt;br /&gt;2009-11-30 &amp;nbsp;Paolo Carlini &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26571726&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;paolo.carlini@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/tr1_impl/functional: Remove file, copy its contents,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trivially adjusted...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/std/functional: ... here, and...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/tr1_impl/functional: ... here.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/Makefile.am: Adjust.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/Makefile.in: Regenerate.
&lt;br&gt;&lt;br&gt;2009-11-30 &amp;nbsp;Jonathan Wakely &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26571726&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jwakely.gcc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/tr1_impl/functional (function): Add rvalue support and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tweak doxygen markup.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/assign/move.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/cons/move.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/invoke/move_only.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/cmp/cmp_neg.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/1.cc: Copy from testsuite/tr1/.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/2.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/3.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/4.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/5.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/6.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/7.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/8.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/9.cc: Likewise.
&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;patch_combo.bz2&lt;/strong&gt; (27K) &lt;a href=&quot;http://old.nabble.com/attachment/26571726/0/patch_combo.bz2&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-C%2B%2B0x--add-rvalue-support-to-std%3A%3Afunction-tp26568002p26571726.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26571285</id>
	<title>Re: [C++0x] add rvalue support to std::function</title>
	<published>2009-11-30T00:42:27Z</published>
	<updated>2009-11-30T00:42:27Z</updated>
	<author>
		<name>Jonathan Wakely-4</name>
	</author>
	<content type="html">2009/11/30 Paolo Carlini:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 11/30/2009 01:34 AM, Jonathan Wakely wrote:
&lt;br&gt;&amp;gt;&amp;gt; This adds move construction and move assignment to std::function, as
&lt;br&gt;&amp;gt;&amp;gt; well function invocation with rvalue arguments, fixing the problem
&lt;br&gt;&amp;gt;&amp;gt; reported at &lt;a href=&quot;http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; Jon, thanks for working on this.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I see that even the std::function changes alone mean quite a few
&lt;br&gt;&amp;gt; #ifdefs: given our general plans in this area I think it makes sense to
&lt;br&gt;&amp;gt; split the tr1_impl implementation of functional immediately. Let me take
&lt;br&gt;&amp;gt; care of that, I will incorporate at the same time this work of yours,
&lt;br&gt;&amp;gt; this way you can concentrate on the other std::functional bits...
&lt;/div&gt;&lt;br&gt;OK, thanks, Paolo. &amp;nbsp;I'll continue working on the other bits later today.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Jon.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-C%2B%2B0x--add-rvalue-support-to-std%3A%3Afunction-tp26568002p26571285.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26571026</id>
	<title>Re: [C++0x] add rvalue support to std::function</title>
	<published>2009-11-29T23:58:49Z</published>
	<updated>2009-11-29T23:58:49Z</updated>
	<author>
		<name>Paolo Carlini-3</name>
	</author>
	<content type="html">On 11/30/2009 01:34 AM, Jonathan Wakely wrote:
&lt;br&gt;&amp;gt; This adds move construction and move assignment to std::function, as
&lt;br&gt;&amp;gt; well function invocation with rvalue arguments, fixing the problem
&lt;br&gt;&amp;gt; reported at &lt;a href=&quot;http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Jon, thanks for working on this.
&lt;br&gt;&lt;br&gt;I see that even the std::function changes alone mean quite a few
&lt;br&gt;#ifdefs: given our general plans in this area I think it makes sense to
&lt;br&gt;split the tr1_impl implementation of functional immediately. Let me take
&lt;br&gt;care of that, I will incorporate at the same time this work of yours,
&lt;br&gt;this way you can concentrate on the other std::functional bits...
&lt;br&gt;&lt;br&gt;Paolo.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-C%2B%2B0x--add-rvalue-support-to-std%3A%3Afunction-tp26568002p26571026.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26568002</id>
	<title>[C++0x] add rvalue support to std::function</title>
	<published>2009-11-29T16:34:16Z</published>
	<updated>2009-11-29T16:34:16Z</updated>
	<author>
		<name>Jonathan Wakely-4</name>
	</author>
	<content type="html">This adds move construction and move assignment to std::function, as
&lt;br&gt;well function invocation with rvalue arguments, fixing the problem
&lt;br&gt;reported at &lt;a href=&quot;http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/libstdc++/2009-06/msg00013.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Still missing is support for constructing a std::function from a
&lt;br&gt;non-copyable functor, that needs some additional changes to
&lt;br&gt;_Function_base::_Base_manager which can be done at a later date. &amp;nbsp;In
&lt;br&gt;the near future &amp;lt;tr1_impl/functional&amp;gt; should be split into two
&lt;br&gt;separate files for C++1x and TR1 implementations, as they will diverge
&lt;br&gt;further.
&lt;br&gt;&lt;br&gt;2009-11-30 &amp;nbsp;Jonathan Wakely &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jwakely.gcc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/tr1_impl/functional (function): Add rvalue support and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tweak doxygen markup.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/assign/move.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/cons/move.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/invoke/move_only.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/cmp/cmp_neg.cc: New.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/1.cc: Copy from testsuite/tr1/.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/2.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/3.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/4.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/5.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/6.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/7.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/8.cc: Likewise.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/20_util/function/9.cc: Likewise.
&lt;br&gt;&lt;br&gt;tested x86_64/linux, I would like to commit this tomorrow before stage 3 ends.
&lt;br&gt;&lt;br&gt;Jonathan
&lt;br&gt;&lt;br /&gt;Index: include/tr1_impl/functional
&lt;br&gt;===================================================================
&lt;br&gt;--- include/tr1_impl/functional	(revision 154742)
&lt;br&gt;+++ include/tr1_impl/functional	(working copy)
&lt;br&gt;@@ -1651,7 +1651,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _Res
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_invoke(const _Any_data&amp; __functor, _ArgTypes... __args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (*_Base::_M_get_pointer(__functor))(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (*_Base::_M_get_pointer(__functor))(__args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1665,7 +1670,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_invoke(const _Any_data&amp; __functor, _ArgTypes... __args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(*_Base::_M_get_pointer(__functor))(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(*_Base::_M_get_pointer(__functor))(__args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1679,8 +1689,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _Res
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_invoke(const _Any_data&amp; __functor, _ArgTypes... __args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return __callable_functor(**_Base::_M_get_pointer(__functor))(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__callable_functor(**_Base::_M_get_pointer(__functor))(__args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1694,7 +1709,12 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_invoke(const _Any_data&amp; __functor, _ArgTypes... __args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__callable_functor(**_Base::_M_get_pointer(__functor))(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__callable_functor(**_Base::_M_get_pointer(__functor))(__args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1710,8 +1730,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static _Res
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_invoke(const _Any_data&amp; __functor, _ArgTypes... __args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return mem_fn(_Base::_M_get_pointer(__functor)-&amp;gt;__value)(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _GLIBCXX_TR1
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;mem_fn(_Base::_M_get_pointer(__functor)-&amp;gt;__value)(__args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1750,8 +1775,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_M_invoke(const _Any_data&amp; __functor, _ArgTypes... __args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+	mem_fn(_Base::_M_get_pointer(__functor)-&amp;gt;__value)(
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_GLIBCXX_TR1
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;mem_fn(_Base::_M_get_pointer(__functor)-&amp;gt;__value)(__args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1785,6 +1815,9 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief Default construct creates an empty function call wrapper.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@post @c !(bool)*this
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function() : _Function_base() { }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;@@ -1796,12 +1829,28 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief %Function copy constructor.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@param x A %function object with identical call signature.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@pre @c (bool)*this == (bool)x
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@post @c (bool)*this == (bool)x
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;The newly-created %function contains a copy of the target of @a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;x (if it has one).
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function(const function&amp; __x);
&lt;br&gt;+
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief %Function move constructor.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@param x A %function object rvalue with identical call signature.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;The newly-created %function contains the target of @a x
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;(if it has one).
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;function(function&amp;&amp; __x) : _Function_base()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__x.swap(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;// TODO: needs allocator_arg_t
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief Builds a %function that targets a copy of the incoming
&lt;br&gt;@@ -1835,7 +1884,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;target, then @c *this will be empty.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;If @a x targets a function pointer or a reference to a function
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;object, then this operation will not throw an exception.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;object, then this operation will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function&amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;operator=(const function&amp; __x)
&lt;br&gt;@@ -1844,12 +1893,32 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief %Function move-assignment operator.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@param x A %function rvalue with identical call signature.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@returns @c *this
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;The target of @a x is moved to @c *this. If @a x has no
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;target, then @c *this will be empty.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;If @a x targets a function pointer or a reference to a function
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;object, then this operation will not throw an %exception.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;function&amp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;operator=(function&amp;&amp; __x)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function(std::move(__x)).swap(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return *this;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief %Function assignment to zero.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@post @c !(bool)*this
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@returns @c *this
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;The target of @a *this is deallocated, leaving it empty.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;The target of @c *this is deallocated, leaving it empty.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function&amp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;operator=(_M_clear_type*)
&lt;br&gt;@@ -1888,6 +1957,18 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;return *this;
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;/// @overload
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Functor&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typename __gnu_cxx::__enable_if&amp;lt;!is_integral&amp;lt;_Functor&amp;gt;::value,
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function&amp;&amp;gt;::__type
&lt;br&gt;+	operator=(reference_wrapper&amp;lt;_Functor&amp;gt; __f)
&lt;br&gt;+	{
&lt;br&gt;+	 &amp;nbsp;function(__f).swap(*this);
&lt;br&gt;+	 &amp;nbsp;return *this;
&lt;br&gt;+	}
&lt;br&gt;+#endif
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// [3.7.2.2] function modifiers
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**
&lt;br&gt;@@ -1895,7 +1976,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@param f A %function with identical call signature.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;Swap the targets of @c this function object and @a f. This
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void swap(function&amp; __x)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;@@ -1909,6 +1990,18 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp;	_M_invoker = __x._M_invoker;
&lt;br&gt;&amp;nbsp;	__x._M_invoker = __old_invoker;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;// TODO: needs allocator_arg_t
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;/*
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Functor, typename _Alloc&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assign(_Functor __f, const _Alloc&amp; __a)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;function(__f, __a).swap(*this);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// [3.7.2.3] function capacity
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1918,7 +2011,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@return @c true when this %function object contains a target,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;or @c false when it is empty.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;This function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp;#ifdef __GXX_EXPERIMENTAL_CXX0X__
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explicit operator bool() const
&lt;br&gt;@@ -1954,7 +2047,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@returns the type identifier of the target function object, or
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;@c typeid(void) if @c !(bool)*this.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;This function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const type_info&amp; target_type() const;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;@@ -1965,7 +2058,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;if @c typeid(Functor).equals(target_type()); otherwise, a NULL
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * &amp;nbsp;pointer.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; * This function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; * This function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Functor&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; _Functor* target();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;@@ -1973,12 +2066,22 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Functor&amp;gt; const _Functor* target() const;
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;// deleted overloads
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Res2, typename... _ArgTypes2&amp;gt;
&lt;br&gt;+	void operator==(const function&amp;lt;_Res2(_ArgTypes2...)&amp;gt;&amp;) const = delete;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Res2, typename... _ArgTypes2&amp;gt;
&lt;br&gt;+	void operator!=(const function&amp;lt;_Res2(_ArgTypes2...)&amp;gt;&amp;) const = delete;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;private:
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;private:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// [3.7.2.6] undefined operators
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Function&amp;gt;
&lt;br&gt;&amp;nbsp;	void operator==(const function&amp;lt;_Function&amp;gt;&amp;) const;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template&amp;lt;typename _Function&amp;gt;
&lt;br&gt;&amp;nbsp;	void operator!=(const function&amp;lt;_Function&amp;gt;&amp;) const;
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typedef _Res (*_Invoker_type)(const _Any_data&amp;, _ArgTypes...);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_Invoker_type _M_invoker;
&lt;br&gt;@@ -2028,7 +2131,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__builtin_abort();
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;return _M_invoker(_M_functor, std::forward&amp;lt;_ArgTypes&amp;gt;(__args)...);
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _M_invoker(_M_functor, __args...);
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef __GXX_RTTI
&lt;br&gt;@@ -2083,6 +2190,57 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
&lt;br&gt;+ &amp;nbsp;// [20.7.15.2.6] null pointer comparisons
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@brief Compares a polymorphic function object wrapper against 0
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;(the NULL pointer).
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@returns @c true if the wrapper has no target, @c false otherwise
&lt;br&gt;+ &amp;nbsp; *
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;+ &amp;nbsp; */
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Res, typename... _Args&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline bool
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;operator==(const function&amp;lt;_Res(_Args...)&amp;gt;&amp; __f, _M_clear_type*)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ return !static_cast&amp;lt;bool&amp;gt;(__f); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;/// @overload
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Res, typename... _Args&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline bool
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;operator==(_M_clear_type*, const function&amp;lt;_Res(_Args...)&amp;gt;&amp; __f)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ return !static_cast&amp;lt;bool&amp;gt;(__f); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@brief Compares a polymorphic function object wrapper against 0
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;(the NULL pointer).
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@returns @c false if the wrapper has no target, @c true otherwise
&lt;br&gt;+ &amp;nbsp; *
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;+ &amp;nbsp; */
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Res, typename... _Args&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline bool
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;operator!=(const function&amp;lt;_Res(_Args...)&amp;gt;&amp; __f, _M_clear_type*)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ return static_cast&amp;lt;bool&amp;gt;(__f); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;/// @overload
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Res, typename... _Args&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline bool
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;operator!=(_M_clear_type*, const function&amp;lt;_Res(_Args...)&amp;gt;&amp; __f)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ return static_cast&amp;lt;bool&amp;gt;(__f); }
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// [20.7.15.2.7] specialized algorithms
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;/**
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;@brief Swap the targets of two polymorphic function object wrappers.
&lt;br&gt;+ &amp;nbsp; *
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;+ &amp;nbsp; */
&lt;br&gt;+ &amp;nbsp;template&amp;lt;typename _Res, typename... _Args&amp;gt;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;inline void
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;swap(function&amp;lt;_Res(_Args...)&amp;gt;&amp; __x, function&amp;lt;_Res(_Args...)&amp;gt;&amp; __y)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{ __x.swap(__y); }
&lt;br&gt;+#else
&lt;br&gt;&amp;nbsp; &amp;nbsp;// [3.7.2.7] null pointer comparisons
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;/**
&lt;br&gt;@@ -2090,7 +2248,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;(the NULL pointer).
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;@returns @c true if the wrapper has no target, @c false otherwise
&lt;br&gt;&amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; * &amp;nbsp;This function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;typename _Signature&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;inline bool
&lt;br&gt;@@ -2108,7 +2266,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;(the NULL pointer).
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;@returns @c false if the wrapper has no target, @c true otherwise
&lt;br&gt;&amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; * &amp;nbsp;This function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;typename _Signature&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;inline bool
&lt;br&gt;@@ -2126,12 +2284,13 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp; &amp;nbsp;/**
&lt;br&gt;&amp;nbsp; &amp;nbsp; * &amp;nbsp;@brief Swap the targets of two polymorphic function object wrappers.
&lt;br&gt;&amp;nbsp; &amp;nbsp; *
&lt;br&gt;- &amp;nbsp; * &amp;nbsp;This function will not throw an exception.
&lt;br&gt;+ &amp;nbsp; * &amp;nbsp;This function will not throw an %exception.
&lt;br&gt;&amp;nbsp; &amp;nbsp; */
&lt;br&gt;&amp;nbsp; &amp;nbsp;template&amp;lt;typename _Signature&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;inline void
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;swap(function&amp;lt;_Signature&amp;gt;&amp; __x, function&amp;lt;_Signature&amp;gt;&amp; __y)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{ __x.swap(__y); }
&lt;br&gt;+#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;_GLIBCXX_END_NAMESPACE_TR1
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;Index: testsuite/20_util/function/assign/move.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/assign/move.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/assign/move.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,50 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+int f1() { return 1; }
&lt;br&gt;+struct { int operator()() { return 2; } } f2;
&lt;br&gt;+
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;typedef std::function&amp;lt;int()&amp;gt; function;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function fo(f1);
&lt;br&gt;+ &amp;nbsp;function fo1;
&lt;br&gt;+ &amp;nbsp;fo1 = (std::move(fo));
&lt;br&gt;+ &amp;nbsp;VERIFY( static_cast&amp;lt;bool&amp;gt;(fo1) );
&lt;br&gt;+ &amp;nbsp;VERIFY( fo1() == 1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;fo = function(f2);
&lt;br&gt;+ &amp;nbsp;function fo2;
&lt;br&gt;+ &amp;nbsp;fo2 = (std::move(fo));
&lt;br&gt;+ &amp;nbsp;VERIFY( static_cast&amp;lt;bool&amp;gt;(fo2) );
&lt;br&gt;+ &amp;nbsp;VERIFY( fo2() == 2 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/cons/move.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/cons/move.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/cons/move.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,48 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+int f1() { return 1; }
&lt;br&gt;+struct { int operator()() { return 2; } } f2;
&lt;br&gt;+
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;typedef std::function&amp;lt;int()&amp;gt; function;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function fo(f1);
&lt;br&gt;+ &amp;nbsp;function fo1(std::move(fo));
&lt;br&gt;+ &amp;nbsp;VERIFY( static_cast&amp;lt;bool&amp;gt;(fo1) );
&lt;br&gt;+ &amp;nbsp;VERIFY( fo1() == 1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;fo = function(f2);
&lt;br&gt;+ &amp;nbsp;function fo2(std::move(fo));
&lt;br&gt;+ &amp;nbsp;VERIFY( static_cast&amp;lt;bool&amp;gt;(fo2) );
&lt;br&gt;+ &amp;nbsp;VERIFY( fo2() == 2 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/invoke/move_only.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/invoke/move_only.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/invoke/move_only.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,61 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+
&lt;br&gt;+struct moveable
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;moveable() = default;
&lt;br&gt;+ &amp;nbsp;~moveable() = default;
&lt;br&gt;+ &amp;nbsp;moveable(const moveable&amp; c) = delete;
&lt;br&gt;+ &amp;nbsp;moveable&amp; operator=(const moveable&amp;) = delete;
&lt;br&gt;+ &amp;nbsp;moveable(moveable&amp;&amp;) { }
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+void f1(moveable) { }
&lt;br&gt;+void f2(moveable&amp;&amp;) { }
&lt;br&gt;+struct { void operator()(moveable&amp;&amp;) { } } f3;
&lt;br&gt;+
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void (moveable)&amp;gt; fo1a(f1);
&lt;br&gt;+ &amp;nbsp;fo1a(moveable());
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void (moveable)&amp;gt; fo2a(f2);
&lt;br&gt;+ &amp;nbsp;fo2a(moveable());
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void (moveable)&amp;gt; fo3a(f3);
&lt;br&gt;+ &amp;nbsp;fo3a(moveable());
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void (moveable&amp;&amp;)&amp;gt; fo1b(f1);
&lt;br&gt;+ &amp;nbsp;fo1b(moveable());
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void (moveable&amp;&amp;)&amp;gt; fo2b(f2);
&lt;br&gt;+ &amp;nbsp;fo2b(moveable());
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void (moveable&amp;&amp;)&amp;gt; fo3b(f3);
&lt;br&gt;+ &amp;nbsp;fo3b(moveable());
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/cmp/cmp_neg.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/cmp/cmp_neg.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/cmp/cmp_neg.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,37 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// { dg-do compile }
&lt;br&gt;+
&lt;br&gt;+// Copyright (C) 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void()&amp;gt; f1;
&lt;br&gt;+ &amp;nbsp;std::function&amp;lt;void()&amp;gt; f2;
&lt;br&gt;+ &amp;nbsp;f1 == f2; &amp;nbsp;// { dg-error &amp;quot;here&amp;quot; }
&lt;br&gt;+ &amp;nbsp;f1 != f2; &amp;nbsp;// { dg-error &amp;quot;here&amp;quot; }
&lt;br&gt;+ &amp;nbsp;// { dg-excess-errors &amp;quot;&amp;quot; }
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/1.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/1.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/1.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,94 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Operations on empty function&amp;lt;&amp;gt; objects
&lt;br&gt;+void test01()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+ &amp;nbsp;using std::bad_function_call;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Default-construction
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f1;
&lt;br&gt;+ &amp;nbsp;VERIFY( ((bool)f1 == false) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( 0 == f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(f1 != 0) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(0 != f1) );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Copy-construction
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f2(f1);
&lt;br&gt;+ &amp;nbsp;VERIFY( !f2 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Construct with NULL pointer
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f3(0);
&lt;br&gt;+ &amp;nbsp;VERIFY( !f3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment
&lt;br&gt;+ &amp;nbsp;f1 = f2;
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment to NULL pointer
&lt;br&gt;+ &amp;nbsp;f1 = 0;
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Swap
&lt;br&gt;+ &amp;nbsp;swap(f1, f2);
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !f2 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Invocation should throw bad_function_call
&lt;br&gt;+ &amp;nbsp;bool thrown = false;
&lt;br&gt;+ &amp;nbsp;try
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;f1(3.14159f);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;VERIFY( false );
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;catch (bad_function_call)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;thrown = true;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;VERIFY( thrown );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target_type returns typeid(void)
&lt;br&gt;+ &amp;nbsp;VERIFY( f1.target_type() == typeid(void) );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target() always returns a NULL pointer
&lt;br&gt;+ &amp;nbsp;VERIFY( f1.target&amp;lt;int (*)(float)&amp;gt;() == 0);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Check const version
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int(float)&amp;gt;&amp; f1c = f1;
&lt;br&gt;+ &amp;nbsp;VERIFY( f1c.target&amp;lt;int (*)(float)&amp;gt;() == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1c );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test01();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/2.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/2.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/2.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,78 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put function pointers into function&amp;lt;&amp;gt; wrappers
&lt;br&gt;+void test02()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f1(truncate_float);
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !!f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(f1 == 0) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(0 == f1) );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( 0 != f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Copy-construction
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f2(f1);
&lt;br&gt;+ &amp;nbsp;VERIFY( f2 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Invocation
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment to zero
&lt;br&gt;+ &amp;nbsp;f1 = 0;
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Swap
&lt;br&gt;+ &amp;nbsp;f1.swap(f2);
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !f2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment from a function pointer
&lt;br&gt;+ &amp;nbsp;f2 = truncate_float;
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target_type and target() functions
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int(float)&amp;gt;&amp; f1c = f1;
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int(*)(float)) == f1.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2.target&amp;lt;int(*)(float)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( *f2.target&amp;lt;int(*)(float)&amp;gt;() == &amp;truncate_float );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1c.target&amp;lt;int(*)(float)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( *f1c.target&amp;lt;int(*)(float)&amp;gt;() == &amp;truncate_float );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test02();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/3.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/3.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/3.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,78 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put nearly-matching function pointers into function&amp;lt;&amp;gt; wrappers
&lt;br&gt;+void test03()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f1(truncate_double);
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !!f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(f1 == 0) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(0 == f1) );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( 0 != f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Copy-construction
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f2(f1);
&lt;br&gt;+ &amp;nbsp;VERIFY( f2 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Invocation
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment to zero
&lt;br&gt;+ &amp;nbsp;f1 = 0;
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Swap
&lt;br&gt;+ &amp;nbsp;f1.swap(f2);
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !f2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment from a function pointer
&lt;br&gt;+ &amp;nbsp;f2 = truncate_double;
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target_type and target() functions
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int(float)&amp;gt;&amp; f1c = f1;
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(long(*)(double)) == f1.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2.target&amp;lt;long(*)(double)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( *f2.target&amp;lt;long(*)(double)&amp;gt;() == &amp;truncate_double );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1c.target&amp;lt;long(*)(double)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( *f1c.target&amp;lt;long(*)(double)&amp;gt;() == &amp;truncate_double );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test03();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/4.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/4.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/4.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,82 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put function objects into function&amp;lt;&amp;gt; wrappers
&lt;br&gt;+void test04()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;do_truncate_float_t truncate_float;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f1(truncate_float);
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !!f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(f1 == 0) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(0 == f1) );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( 0 != f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Copy-construction
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f2(f1);
&lt;br&gt;+ &amp;nbsp;VERIFY( f2 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Invocation
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment to zero
&lt;br&gt;+ &amp;nbsp;f1 = 0;
&lt;br&gt;+ &amp;nbsp;VERIFY( !f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Swap
&lt;br&gt;+ &amp;nbsp;f1.swap(f2);
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !f2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Assignment from a function pointer
&lt;br&gt;+ &amp;nbsp;f2 = do_truncate_float_t();
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target_type and target() functions
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int(float)&amp;gt;&amp; f1c = f1;
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(do_truncate_float_t) == f1.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2.target&amp;lt;do_truncate_float_t&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1c.target&amp;lt;do_truncate_float_t&amp;gt;() != 0 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test04();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;VERIFY( do_truncate_double_t::live_objects == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( do_truncate_float_t::live_objects == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/5.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/5.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/5.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,107 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put member pointers into function&amp;lt;&amp;gt; wrappers
&lt;br&gt;+void test05()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;X x;
&lt;br&gt;+ &amp;nbsp;x.bar = 17;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X&amp;)&amp;gt; frm(&amp;X::bar);
&lt;br&gt;+ &amp;nbsp;VERIFY( frm );
&lt;br&gt;+ &amp;nbsp;VERIFY( frm(x) == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int X::*) == frm.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *frm.target&amp;lt;int X::*&amp;gt;() == &amp;X::bar );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X&amp;)&amp;gt; fr(&amp;X::foo);
&lt;br&gt;+ &amp;nbsp;VERIFY( fr );
&lt;br&gt;+ &amp;nbsp;VERIFY( fr(x) == 1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)()) == fr.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *fr.target&amp;lt;int (X::*)()&amp;gt;() == &amp;X::foo );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const X&amp;)&amp;gt; frc(&amp;X::foo_c);
&lt;br&gt;+ &amp;nbsp;VERIFY( frc );
&lt;br&gt;+ &amp;nbsp;VERIFY( frc(x) == 2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const) == frc.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *frc.target&amp;lt;int (X::*)() const &amp;gt;() == &amp;X::foo_c );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(volatile X&amp;)&amp;gt; frv(&amp;X::foo_v);
&lt;br&gt;+ &amp;nbsp;VERIFY( frv );
&lt;br&gt;+ &amp;nbsp;VERIFY( frv(x) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() volatile) == frv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *frv.target&amp;lt;int (X::*)() volatile &amp;gt;() == &amp;X::foo_v );
&lt;br&gt;+ &amp;nbsp;VERIFY( frv.target&amp;lt;int (X::*)() const volatile&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const volatile X&amp;)&amp;gt; frcv(&amp;X::foo_cv);
&lt;br&gt;+ &amp;nbsp;VERIFY( frcv );
&lt;br&gt;+ &amp;nbsp;VERIFY( frcv(x) == 4 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const volatile) == frcv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *frcv.target&amp;lt;int (X::*)() const volatile &amp;gt;() == &amp;X::foo_cv );
&lt;br&gt;+ &amp;nbsp;VERIFY( frcv.target&amp;lt;int (X::*)() const&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X*)&amp;gt; grm(&amp;X::bar);
&lt;br&gt;+ &amp;nbsp;VERIFY( grm );
&lt;br&gt;+ &amp;nbsp;VERIFY( grm(&amp;x) == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int X::*) == grm.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grm.target&amp;lt;int X::*&amp;gt;() == &amp;X::bar );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X*)&amp;gt; gr(&amp;X::foo);
&lt;br&gt;+ &amp;nbsp;VERIFY( gr );
&lt;br&gt;+ &amp;nbsp;VERIFY( gr(&amp;x) == 1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)()) == gr.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *gr.target&amp;lt;int (X::*)()&amp;gt;() == &amp;X::foo );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const X*)&amp;gt; grc(&amp;X::foo_c);
&lt;br&gt;+ &amp;nbsp;VERIFY( grc );
&lt;br&gt;+ &amp;nbsp;VERIFY( grc(&amp;x) == 2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const) == grc.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grc.target&amp;lt;int (X::*)() const &amp;gt;() == &amp;X::foo_c );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(volatile X*)&amp;gt; grv(&amp;X::foo_v);
&lt;br&gt;+ &amp;nbsp;VERIFY( grv );
&lt;br&gt;+ &amp;nbsp;VERIFY( grv(&amp;x) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() volatile) == grv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grv.target&amp;lt;int (X::*)() volatile &amp;gt;() == &amp;X::foo_v );
&lt;br&gt;+ &amp;nbsp;VERIFY( grv.target&amp;lt;int (X::*)() const volatile&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const volatile X*)&amp;gt; grcv(&amp;X::foo_cv);
&lt;br&gt;+ &amp;nbsp;VERIFY( grcv );
&lt;br&gt;+ &amp;nbsp;VERIFY( grcv(&amp;x) == 4 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const volatile) == grcv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grcv.target&amp;lt;int (X::*)() const volatile &amp;gt;() == &amp;X::foo_cv );
&lt;br&gt;+ &amp;nbsp;VERIFY( grcv.target&amp;lt;int (X::*)() const&amp;gt;() == 0 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test05();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/6.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/6.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/6.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,82 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+struct secret {};
&lt;br&gt;+
&lt;br&gt;+struct noncopyable_function_object_type
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;noncopyable_function_object_type(secret) {}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int operator()() const { return 42; }
&lt;br&gt;+ &amp;nbsp;int operator()() &amp;nbsp; &amp;nbsp; &amp;nbsp; { return 17; }
&lt;br&gt;+
&lt;br&gt;+ private:
&lt;br&gt;+ &amp;nbsp;noncopyable_function_object_type();
&lt;br&gt;+ &amp;nbsp;noncopyable_function_object_type(const noncopyable_function_object_type&amp;);
&lt;br&gt;+ &amp;nbsp;void operator=(const noncopyable_function_object_type&amp;);
&lt;br&gt;+};
&lt;br&gt;+
&lt;br&gt;+// Put reference_wrappers into function&amp;lt;&amp;gt; wrappers
&lt;br&gt;+void test06()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+ &amp;nbsp;using std::ref;
&lt;br&gt;+ &amp;nbsp;using std::cref;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;secret password;
&lt;br&gt;+ &amp;nbsp;noncopyable_function_object_type x(password);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int()&amp;gt; f(ref(x));
&lt;br&gt;+ &amp;nbsp;VERIFY( f );
&lt;br&gt;+ &amp;nbsp;VERIFY( f() == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f.target_type() == typeid(noncopyable_function_object_type) );
&lt;br&gt;+ &amp;nbsp;VERIFY( f.target&amp;lt;noncopyable_function_object_type&amp;gt;() == &amp;x );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int()&amp;gt; g = f;
&lt;br&gt;+ &amp;nbsp;VERIFY( g );
&lt;br&gt;+ &amp;nbsp;VERIFY( g() == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( g.target_type() == typeid(noncopyable_function_object_type) );
&lt;br&gt;+ &amp;nbsp;VERIFY( g.target&amp;lt;noncopyable_function_object_type&amp;gt;() == &amp;x );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int()&amp;gt; h = cref(x);
&lt;br&gt;+ &amp;nbsp;VERIFY( h );
&lt;br&gt;+ &amp;nbsp;VERIFY( h() == 42 );
&lt;br&gt;+ &amp;nbsp;VERIFY( h.target_type() == typeid(noncopyable_function_object_type) );
&lt;br&gt;+ &amp;nbsp;VERIFY( h.target&amp;lt;const noncopyable_function_object_type&amp;gt;() == &amp;x );
&lt;br&gt;+ &amp;nbsp;VERIFY( h.target&amp;lt;const noncopyable_function_object_type&amp;gt;() == &amp;x );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int()&amp;gt;&amp; hc = h;
&lt;br&gt;+ &amp;nbsp;VERIFY( h.target&amp;lt;noncopyable_function_object_type&amp;gt;() == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( hc.target&amp;lt;noncopyable_function_object_type&amp;gt;() == &amp;x );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test06();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/7.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/7.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/7.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,82 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put reference_wrappers to function pointers into function&amp;lt;&amp;gt; wrappers
&lt;br&gt;+void test07()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+ &amp;nbsp;using std::ref;
&lt;br&gt;+ &amp;nbsp;using std::cref;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int (*fptr)(float) = truncate_float;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f1(ref(fptr));
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !!f1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(f1 == 0) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(0 == f1) );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1 != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( 0 != f1 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Invocation
&lt;br&gt;+ &amp;nbsp;VERIFY( f1(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target_type and target() functions
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int(float)&amp;gt;&amp; f1c = f1;
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int(*)(float)) == f1.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1.target&amp;lt;int(*)(float)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1.target&amp;lt;int(*)(float)&amp;gt;() == &amp;fptr );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1c.target&amp;lt;int(*)(float)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f1c.target&amp;lt;int(*)(float)&amp;gt;() == &amp;fptr );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(float)&amp;gt; f2(cref(fptr));
&lt;br&gt;+ &amp;nbsp;VERIFY( f2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !!f2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(f2 == 0) );
&lt;br&gt;+ &amp;nbsp;VERIFY( !(0 == f2) );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2 != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( 0 != f2 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// Invocation
&lt;br&gt;+ &amp;nbsp;VERIFY( f2(3.1f) == 3 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;// target_type and target() functions
&lt;br&gt;+ &amp;nbsp;const function&amp;lt;int(float)&amp;gt;&amp; f2c = f2;
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int(*)(float)) == f2.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2.target&amp;lt;int(*)(float)&amp;gt;() == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2.target&amp;lt;int(* const)(float)&amp;gt;() == &amp;fptr );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2c.target&amp;lt;int(*)(float)&amp;gt;() != 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( f2c.target&amp;lt;int(*)(float)&amp;gt;() == &amp;fptr );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test07();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/8.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/8.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/8.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,148 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put reference_wrappers to member pointers
&lt;br&gt;+void test08()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+ &amp;nbsp;using std::ref;
&lt;br&gt;+ &amp;nbsp;using std::cref;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int X::* X_bar = &amp;X::bar;
&lt;br&gt;+ &amp;nbsp;int (X::* X_foo)() = &amp;X::foo;
&lt;br&gt;+ &amp;nbsp;int (X::* X_foo_c)() const = &amp;X::foo_c;
&lt;br&gt;+ &amp;nbsp;int (X::* X_foo_v)() volatile = &amp;X::foo_v;
&lt;br&gt;+ &amp;nbsp;int (X::* X_foo_cv)() const volatile = &amp;X::foo_cv;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;X x;
&lt;br&gt;+ &amp;nbsp;x.bar = 17;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X&amp;)&amp;gt; frm(ref(X_bar));
&lt;br&gt;+ &amp;nbsp;VERIFY( frm );
&lt;br&gt;+ &amp;nbsp;VERIFY( frm(x) == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int X::*) == frm.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( frm.target&amp;lt;int X::*&amp;gt;() == &amp;X_bar );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X&amp;)&amp;gt; fr(ref(X_foo));
&lt;br&gt;+ &amp;nbsp;VERIFY( fr );
&lt;br&gt;+ &amp;nbsp;VERIFY( fr(x) == 1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)()) == fr.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( fr.target&amp;lt;int (X::*)()&amp;gt;() == &amp;X_foo );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const X&amp;)&amp;gt; frc(ref(X_foo_c));
&lt;br&gt;+ &amp;nbsp;VERIFY( frc );
&lt;br&gt;+ &amp;nbsp;VERIFY( frc(x) == 2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const) == frc.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( frc.target&amp;lt;int (X::*)() const &amp;gt;() == &amp;X_foo_c );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(volatile X&amp;)&amp;gt; frv(ref(X_foo_v));
&lt;br&gt;+ &amp;nbsp;VERIFY( frv );
&lt;br&gt;+ &amp;nbsp;VERIFY( frv(x) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() volatile) == frv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *frv.target&amp;lt;int (X::*)() volatile &amp;gt;() == X_foo_v );
&lt;br&gt;+ &amp;nbsp;VERIFY( frv.target&amp;lt;int (X::*)() const volatile&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const volatile X&amp;)&amp;gt; frcv(ref(X_foo_cv));
&lt;br&gt;+ &amp;nbsp;VERIFY( frcv );
&lt;br&gt;+ &amp;nbsp;VERIFY( frcv(x) == 4 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const volatile) == frcv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *frcv.target&amp;lt;int (X::*)() const volatile &amp;gt;() == X_foo_cv );
&lt;br&gt;+ &amp;nbsp;VERIFY( frcv.target&amp;lt;int (X::*)() const&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X*)&amp;gt; grm(ref(X_bar));
&lt;br&gt;+ &amp;nbsp;VERIFY( grm );
&lt;br&gt;+ &amp;nbsp;VERIFY( grm(&amp;x) == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int X::*) == grm.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grm.target&amp;lt;int X::*&amp;gt;() == X_bar );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X*)&amp;gt; gr(ref(X_foo));
&lt;br&gt;+ &amp;nbsp;VERIFY( gr );
&lt;br&gt;+ &amp;nbsp;VERIFY( gr(&amp;x) == 1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)()) == gr.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *gr.target&amp;lt;int (X::*)()&amp;gt;() == X_foo );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const X*)&amp;gt; grc(ref(X_foo_c));
&lt;br&gt;+ &amp;nbsp;VERIFY( grc );
&lt;br&gt;+ &amp;nbsp;VERIFY( grc(&amp;x) == 2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const) == grc.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grc.target&amp;lt;int (X::*)() const &amp;gt;() == X_foo_c );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(volatile X*)&amp;gt; grv(ref(X_foo_v));
&lt;br&gt;+ &amp;nbsp;VERIFY( grv );
&lt;br&gt;+ &amp;nbsp;VERIFY( grv(&amp;x) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() volatile) == grv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grv.target&amp;lt;int (X::*)() volatile &amp;gt;() == X_foo_v );
&lt;br&gt;+ &amp;nbsp;VERIFY( grv.target&amp;lt;int (X::*)() const volatile&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const volatile X*)&amp;gt; grcv(ref(X_foo_cv));
&lt;br&gt;+ &amp;nbsp;VERIFY( grcv );
&lt;br&gt;+ &amp;nbsp;VERIFY( grcv(&amp;x) == 4 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const volatile) == grcv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( *grcv.target&amp;lt;int (X::*)() const volatile &amp;gt;() == X_foo_cv );
&lt;br&gt;+ &amp;nbsp;VERIFY( grcv.target&amp;lt;int (X::*)() const&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X&amp;)&amp;gt; hrm(cref(X_bar));
&lt;br&gt;+ &amp;nbsp;VERIFY( hrm );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrm(x) == 17 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int X::*) == hrm.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrm.target&amp;lt;int X::*&amp;gt;() == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrm.target&amp;lt;int X::* const&amp;gt;() == &amp;X_bar );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(X&amp;)&amp;gt; hr(cref(X_foo));
&lt;br&gt;+ &amp;nbsp;VERIFY( hr );
&lt;br&gt;+ &amp;nbsp;VERIFY( hr(x) == 1 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)()) == hr.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( hr.target&amp;lt;int (X::* const)()&amp;gt;() == &amp;X_foo );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const X&amp;)&amp;gt; hrc(cref(X_foo_c));
&lt;br&gt;+ &amp;nbsp;VERIFY( hrc );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrc(x) == 2 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const) == hrc.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrc.target&amp;lt;int (X::* const)() const &amp;gt;() == &amp;X_foo_c );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(volatile X&amp;)&amp;gt; hrv(cref(X_foo_v));
&lt;br&gt;+ &amp;nbsp;VERIFY( hrv );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrv(x) == 3 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() volatile) == hrv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrv.target&amp;lt;int (X::* const)() volatile &amp;gt;() == &amp;X_foo_v );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrv.target&amp;lt;int (X::* const)() const volatile&amp;gt;() == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;int(const volatile X&amp;)&amp;gt; hrcv(cref(X_foo_cv));
&lt;br&gt;+ &amp;nbsp;VERIFY( hrcv );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrcv(x) == 4 );
&lt;br&gt;+ &amp;nbsp;VERIFY( typeid(int (X::*)() const volatile) == hrcv.target_type() );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrcv.target&amp;lt;int (X::* const)() const volatile &amp;gt;() == &amp;X_foo_cv );
&lt;br&gt;+ &amp;nbsp;VERIFY( hrcv.target&amp;lt;int (X::* const)() const&amp;gt;() == 0 );
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test08();
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;Index: testsuite/20_util/function/9.cc
&lt;br&gt;===================================================================
&lt;br&gt;--- testsuite/20_util/function/9.cc	(revision 0)
&lt;br&gt;+++ testsuite/20_util/function/9.cc	(revision 0)
&lt;br&gt;@@ -0,0 +1,55 @@
&lt;br&gt;+// { dg-options &amp;quot;-std=gnu++0x&amp;quot; }
&lt;br&gt;+// 2005-01-15 Douglas Gregor &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26568002&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dgregor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;+//
&lt;br&gt;+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
&lt;br&gt;+//
&lt;br&gt;+// This file is part of the GNU ISO C++ Library. &amp;nbsp;This library is free
&lt;br&gt;+// software; you can redistribute it and/or modify it under the
&lt;br&gt;+// terms of the GNU General Public License as published by the
&lt;br&gt;+// Free Software Foundation; either version 3, or (at your option)
&lt;br&gt;+// any later version.
&lt;br&gt;+//
&lt;br&gt;+// This library is distributed in the hope that it will be useful,
&lt;br&gt;+// but WITHOUT ANY WARRANTY; without even the implied warranty of
&lt;br&gt;+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the
&lt;br&gt;+// GNU General Public License for more details.
&lt;br&gt;+//
&lt;br&gt;+// You should have received a copy of the GNU General Public License along
&lt;br&gt;+// with this library; see the file COPYING3. &amp;nbsp;If not see
&lt;br&gt;+// &amp;lt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/licenses/&lt;/a&gt;&amp;gt;.
&lt;br&gt;+
&lt;br&gt;+// 20.7.15 polymorphic function object wrapper
&lt;br&gt;+#include &amp;lt;functional&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_hooks.h&amp;gt;
&lt;br&gt;+#include &amp;lt;testsuite_tr1.h&amp;gt;
&lt;br&gt;+
&lt;br&gt;+using namespace __gnu_test;
&lt;br&gt;+
&lt;br&gt;+bool test __attribute__((unused)) = true;
&lt;br&gt;+
&lt;br&gt;+// Put function objects into a void-returning function&amp;lt;&amp;gt; wrapper
&lt;br&gt;+void test09()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;using std::function;
&lt;br&gt;+ &amp;nbsp;using std::ref;
&lt;br&gt;+ &amp;nbsp;using std::cref;
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;int (X::*X_foo_c)() const = &amp;X::foo_c;
&lt;br&gt;+ &amp;nbsp;function&amp;lt;void(X&amp;)&amp;gt; f(&amp;X::bar);
&lt;br&gt;+ &amp;nbsp;f = &amp;X::foo;
&lt;br&gt;+ &amp;nbsp;f = ref(X_foo_c);
&lt;br&gt;+ &amp;nbsp;f = cref(X_foo_c);
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;function&amp;lt;void(float)&amp;gt; g = &amp;truncate_float;
&lt;br&gt;+ &amp;nbsp;g = do_truncate_float_t();
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;+int main()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;test09();
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;VERIFY( do_truncate_double_t::live_objects == 0 );
&lt;br&gt;+ &amp;nbsp;VERIFY( do_truncate_float_t::live_objects == 0 );
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp;return 0;
&lt;br&gt;+}
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-C%2B%2B0x--add-rvalue-support-to-std%3A%3Afunction-tp26568002p26568002.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26567417</id>
	<title>forward_list patch for N2913</title>
	<published>2009-11-29T15:12:03Z</published>
	<updated>2009-11-29T15:12:03Z</updated>
	<author>
		<name>Bob Walters-2</name>
	</author>
	<content type="html">Posting a patch which changes the template parameters of forward_list types to be in better conformance
&lt;br&gt;with N2913 (SCARY). &amp;nbsp;Added __pointer_traits to retain alternative pointer support.
&lt;br&gt;&lt;br&gt;Tested: Darwin 11 x86_64
&lt;br&gt;&lt;br&gt;libstdc++-v3/ChangeLog:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/ext/pointer_traits.h: Add
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/ext/pointer.h: added struct rebind
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/bits/forward_list.h: change template args of iterator
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; and node to use pointer type instead of allocator to support N2913.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/bits/forward_list.tcc: same
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * include/Makefile.am: added ext/pointer_traits.h
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/ext/ext_pointer/1_neg.cc: adjust dg-error line numbers
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; same
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; same
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc: 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; same
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc: 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; same
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;patch&lt;/strong&gt; (18K) &lt;a href=&quot;http://old.nabble.com/attachment/26567417/0/patch&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/forward_list-patch-for-N2913-tp26567417p26567417.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26564049</id>
	<title>[v3 patch] add __GXX_RTTI to doxygen predefined macros</title>
	<published>2009-11-29T09:34:36Z</published>
	<updated>2009-11-29T09:34:36Z</updated>
	<author>
		<name>Jonathan Wakely-4</name>
	</author>
	<content type="html">2009-11-29 &amp;nbsp;Jonathan Wakely &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26564049&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jwakely.gcc@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * doc/doxygen/user.cfg.in: Add __GXX_RTTI to PREDEFINED macros.
&lt;br&gt;&lt;br&gt;This ensures that features which depend on RTTI appear in the doxygen
&lt;br&gt;docs, e.g. &amp;nbsp;std::function::target_type()
&lt;br&gt;&lt;br&gt;Tested doc-html-doxygen target on x86_64/linux
&lt;br&gt;&lt;br /&gt;Index: doc/doxygen/user.cfg.in
&lt;br&gt;===================================================================
&lt;br&gt;--- doc/doxygen/user.cfg.in	(revision 154736)
&lt;br&gt;+++ doc/doxygen/user.cfg.in	(working copy)
&lt;br&gt;@@ -1449,6 +1449,7 @@ PREDEFINED &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = __cplusplus \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _GLIBCXX_ATOMIC_BUILTINS_8 \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _GLIBCXX_USE_SCHED_YIELD \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _GLIBCXX_USE_NANOSLEEP \
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __GXX_RTTI \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __glibcxx_function_requires=// \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __glibcxx_class_requires=// \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __glibcxx_class_requires2=// \
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-v3-patch--add-__GXX_RTTI-to-doxygen-predefined-macros-tp26564049p26564049.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26563004</id>
	<title>Re: Reminder: Stage3 ends Nov 30th</title>
	<published>2009-11-29T07:33:39Z</published>
	<updated>2009-11-29T07:33:39Z</updated>
	<author>
		<name>Kaveh R. Ghazi</name>
	</author>
	<content type="html">On Sun, 29 Nov 2009, Richard Guenther wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is a remainder to not catch you in surprise when we announce
&lt;br&gt;&amp;gt; the end of stage 3. &amp;nbsp;Starting Dec 1st the trunk will go into
&lt;br&gt;&amp;gt; regression and documentation fixes only mode (thus, same rules
&lt;br&gt;&amp;gt; apply as for a release branch). &amp;nbsp;When the release criteria
&lt;br&gt;&amp;gt; are fulfilled (mainly zero P1 regressions) we will branch,
&lt;br&gt;&amp;gt; do a release candidate and open trunk for the next stage 1.
&lt;br&gt;&amp;gt; It is very unlikely that this happens before mid January.
&lt;br&gt;&lt;br&gt;I'm having trouble getting the MPC cutover patch reviewed by a build
&lt;br&gt;maintainer.
&lt;br&gt;&lt;a href=&quot;http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00731.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00731.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Since PR40302 was marked by you as a &amp;quot;regression&amp;quot; to ensure it gets done,
&lt;br&gt;may I assume that this and the approved cleanups can go in during stage4
&lt;br&gt;once someone looks at the configure bits?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thanks,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --Kaveh
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reminder%3A-Stage3-ends-Nov-30th-tp26561258p26563004.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26561258</id>
	<title>Reminder: Stage3 ends Nov 30th</title>
	<published>2009-11-29T03:42:57Z</published>
	<updated>2009-11-29T03:42:57Z</updated>
	<author>
		<name>Richard Guenther-3</name>
	</author>
	<content type="html">&lt;br&gt;This is a remainder to not catch you in surprise when we announce
&lt;br&gt;the end of stage 3. &amp;nbsp;Starting Dec 1st the trunk will go into
&lt;br&gt;regression and documentation fixes only mode (thus, same rules
&lt;br&gt;apply as for a release branch). &amp;nbsp;When the release criteria
&lt;br&gt;are fulfilled (mainly zero P1 regressions) we will branch,
&lt;br&gt;do a release candidate and open trunk for the next stage 1.
&lt;br&gt;It is very unlikely that this happens before mid January.
&lt;br&gt;&lt;br&gt;A status report will be sent at the start of &amp;quot;stage 4&amp;quot;.
&lt;br&gt;&lt;br&gt;Richard.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Richard Guenther &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26561258&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rguenther@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Novell / SUSE Labs
&lt;br&gt;SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Reminder%3A-Stage3-ends-Nov-30th-tp26561258p26561258.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26549540</id>
	<title>Re: how to get read/write access for profile extension contributor</title>
	<published>2009-11-27T16:49:58Z</published>
	<updated>2009-11-27T16:49:58Z</updated>
	<author>
		<name>Benjamin Kosnik</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&amp;gt; But the general guideline for write access to the SVN tree is
&lt;br&gt;&amp;gt; successful submission of a couple of patches. &amp;nbsp;That ensures that the
&lt;br&gt;&amp;gt; contributor understands gcc's submission and commit policy to at least
&lt;br&gt;&amp;gt; a minimal degree. &amp;nbsp;Write access is a powerful tool, since we must
&lt;br&gt;&amp;gt; essentially trust everybody with write access, so the gcc maintainers
&lt;br&gt;&amp;gt; don't normally give it out on spec.
&lt;br&gt;&lt;br&gt;Yep. 
&lt;br&gt;&lt;br&gt;Let's try to work the kinks out with the first couple of patches,
&lt;br&gt;and then when everything looks good after a bit re-discuss.
&lt;br&gt;&lt;br&gt;-benjamin
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-read-write-access-for-profile-extension-contributor-tp26524681p26549540.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543058</id>
	<title>Re: how to get read/write access for profile extension contributor</title>
	<published>2009-11-27T06:21:40Z</published>
	<updated>2009-11-27T06:21:40Z</updated>
	<author>
		<name>Ian Lance Taylor-3</name>
	</author>
	<content type="html">Silvius Rus &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543058&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rus@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt; Changhee is a contributor to the profile extension (cc-ed) and he is
&lt;br&gt;&amp;gt; trying to get read/write access to submit a patch to the
&lt;br&gt;&amp;gt; profile-stdlib branch. &amp;nbsp;I cannot approve his read/write access
&lt;br&gt;&amp;gt; request, as I am not a maintainer. &amp;nbsp;Is it possible for one of you to
&lt;br&gt;&amp;gt; sponsor his request? &amp;nbsp;Again, he would be submitting patches only to
&lt;br&gt;&amp;gt; the profile-stdlib branch for now. &amp;nbsp;Would it help if he sent the first
&lt;br&gt;&amp;gt; patch for discussion? &amp;nbsp;(I'd prefer not to discuss it until it is ready
&lt;br&gt;&amp;gt; for trunk, as it would have to be reviewed at that point anyway.)
&lt;br&gt;&lt;br&gt;The libstdc++ maintainers can of course make their own decision here.
&lt;br&gt;&lt;br&gt;But the general guideline for write access to the SVN tree is
&lt;br&gt;successful submission of a couple of patches. &amp;nbsp;That ensures that the
&lt;br&gt;contributor understands gcc's submission and commit policy to at least
&lt;br&gt;a minimal degree. &amp;nbsp;Write access is a powerful tool, since we must
&lt;br&gt;essentially trust everybody with write access, so the gcc maintainers
&lt;br&gt;don't normally give it out on spec.
&lt;br&gt;&lt;br&gt;Ian
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-get-read-write-access-for-profile-extension-contributor-tp26524681p26543058.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542293</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T05:15:26Z</published>
	<updated>2009-11-27T05:15:26Z</updated>
	<author>
		<name>Thiago Farina-2</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 7:56 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542293&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Sure this is what I was precisely doing. I'll copy you
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Christian
&lt;br&gt;&amp;gt;
&lt;br&gt;Please don't top post. &lt;a href=&quot;http://daringfireball.net/2007/07/on_top&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://daringfireball.net/2007/07/on_top&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26542293.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540125</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T01:56:46Z</published>
	<updated>2009-11-27T01:56:46Z</updated>
	<author>
		<name>Christian BRUEL</name>
	</author>
	<content type="html">Sure this is what I was precisely doing. I'll copy you
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Christian
&lt;br&gt;&lt;br&gt;Gabriel Dos Reis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Fri, Nov 27, 2009 at 3:29 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540125&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; If you want a complete example of how this is used this you can check the
&lt;br&gt;&amp;gt;&amp;gt; example 14-22 at
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.linux-kheops.com/doc/casteyde/cours_cpp-1.40.1/htm/x5866.htm#AEN6045&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linux-kheops.com/doc/casteyde/cours_cpp-1.40.1/htm/x5866.htm#AEN6045&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; that segfaults with g++
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; because the computed assignment is between a source and a destination that
&lt;br&gt;&amp;gt;&amp;gt; have different sizes. It's a user error so easy to step into I guess. The
&lt;br&gt;&amp;gt;&amp;gt; Standard didn't make this point very intuitive.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks. &amp;nbsp;Could you contact the author of the `lecture' and have him/her correct
&lt;br&gt;&amp;gt; that example?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Gaby
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26540125.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540103</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T01:55:21Z</published>
	<updated>2009-11-27T01:55:21Z</updated>
	<author>
		<name>Gabriel Dos Reis</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 3:29 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540103&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; If you want a complete example of how this is used this you can check the
&lt;br&gt;&amp;gt; example 14-22 at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.linux-kheops.com/doc/casteyde/cours_cpp-1.40.1/htm/x5866.htm#AEN6045&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linux-kheops.com/doc/casteyde/cours_cpp-1.40.1/htm/x5866.htm#AEN6045&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; that segfaults with g++
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; because the computed assignment is between a source and a destination that
&lt;br&gt;&amp;gt; have different sizes. It's a user error so easy to step into I guess. The
&lt;br&gt;&amp;gt; Standard didn't make this point very intuitive.
&lt;br&gt;&lt;br&gt;Thanks. &amp;nbsp;Could you contact the author of the `lecture' and have him/her correct
&lt;br&gt;that example?
&lt;br&gt;&lt;br&gt;-- Gaby
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26540103.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539840</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T01:29:14Z</published>
	<updated>2009-11-27T01:29:14Z</updated>
	<author>
		<name>Christian BRUEL</name>
	</author>
	<content type="html">If you want a complete example of how this is used this you can check 
&lt;br&gt;the example 14-22 at 
&lt;br&gt;&lt;a href=&quot;http://www.linux-kheops.com/doc/casteyde/cours_cpp-1.40.1/htm/x5866.htm#AEN6045&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linux-kheops.com/doc/casteyde/cours_cpp-1.40.1/htm/x5866.htm#AEN6045&lt;/a&gt;&lt;br&gt;&lt;br&gt;that segfaults with g++
&lt;br&gt;&lt;br&gt;because the computed assignment is between a source and a destination 
&lt;br&gt;that have different sizes. It's a user error so easy to step into I 
&lt;br&gt;guess. The Standard didn't make this point very intuitive.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Christian
&lt;br&gt;&lt;br&gt;&lt;br&gt;Gabriel Dos Reis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Fri, Nov 27, 2009 at 3:02 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539840&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Now that you established that it was a user bug, just wanted to slightly
&lt;br&gt;&amp;gt;&amp;gt; correct the problem characterization by fixing the code with
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;b[0] = foo();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;dest[b] = src[b];
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; so the problem was the &amp;quot;this&amp;quot; size really, not the runtime dependency on
&lt;br&gt;&amp;gt;&amp;gt; foo(). Hope this could be of interest (regarding all the bogus examples I
&lt;br&gt;&amp;gt;&amp;gt; found including the computed assignment variation).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Are you still having a problem with that? &amp;nbsp;If yes, could
&lt;br&gt;&amp;gt; you send a minimal complete program?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Gaby
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26539840.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539710</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T01:18:04Z</published>
	<updated>2009-11-27T01:18:04Z</updated>
	<author>
		<name>Christian BRUEL</name>
	</author>
	<content type="html">No, I was just posting the fix to my initial test case for information, 
&lt;br&gt;since I agree with you that the src and dest size should be the same, 
&lt;br&gt;and that size of dest is not size of dest[b] I don't have any issue now.
&lt;br&gt;&lt;br&gt;so
&lt;br&gt;&lt;br&gt;int main(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;int n = 2;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;valarray&amp;lt;int&amp;gt; &amp;nbsp;dest(n);
&lt;br&gt;&amp;nbsp; &amp;nbsp;valarray&amp;lt;bool&amp;gt; b(false, n);
&lt;br&gt;&amp;nbsp; &amp;nbsp;valarray&amp;lt;int&amp;gt; &amp;nbsp;src(1, n);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;b[0] = foo();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;dest[b] = src[b];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; dest[0] &amp;lt;&amp;lt; endl;
&lt;br&gt;&amp;nbsp; &amp;nbsp;cout &amp;lt;&amp;lt; dest[1] &amp;lt;&amp;lt; endl;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;return 0;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Works regardless of the mask_array initialization values.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Christian
&lt;br&gt;&lt;br&gt;Gabriel Dos Reis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Fri, Nov 27, 2009 at 3:02 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539710&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Now that you established that it was a user bug, just wanted to slightly
&lt;br&gt;&amp;gt;&amp;gt; correct the problem characterization by fixing the code with
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;b[0] = foo();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;dest[b] = src[b];
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; so the problem was the &amp;quot;this&amp;quot; size really, not the runtime dependency on
&lt;br&gt;&amp;gt;&amp;gt; foo(). Hope this could be of interest (regarding all the bogus examples I
&lt;br&gt;&amp;gt;&amp;gt; found including the computed assignment variation).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Are you still having a problem with that? &amp;nbsp;If yes, could
&lt;br&gt;&amp;gt; you send a minimal complete program?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Gaby
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26539710.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539622</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T01:09:20Z</published>
	<updated>2009-11-27T01:09:20Z</updated>
	<author>
		<name>Gabriel Dos Reis</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 3:02 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539622&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Now that you established that it was a user bug, just wanted to slightly
&lt;br&gt;&amp;gt; correct the problem characterization by fixing the code with
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  b[0] = foo();
&lt;br&gt;&amp;gt;  dest[b] = src[b];
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; so the problem was the &amp;quot;this&amp;quot; size really, not the runtime dependency on
&lt;br&gt;&amp;gt; foo(). Hope this could be of interest (regarding all the bogus examples I
&lt;br&gt;&amp;gt; found including the computed assignment variation).
&lt;br&gt;&lt;br&gt;Are you still having a problem with that? &amp;nbsp;If yes, could
&lt;br&gt;you send a minimal complete program?
&lt;br&gt;&lt;br&gt;-- Gaby
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26539622.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539562</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-27T01:02:13Z</published>
	<updated>2009-11-27T01:02:13Z</updated>
	<author>
		<name>Christian BRUEL</name>
	</author>
	<content type="html">Now that you established that it was a user bug, just wanted to slightly 
&lt;br&gt;correct the problem characterization by fixing the code with
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;b[0] = foo();
&lt;br&gt;&amp;nbsp; &amp;nbsp;dest[b] = src[b];
&lt;br&gt;&lt;br&gt;so the problem was the &amp;quot;this&amp;quot; size really, not the runtime dependency on 
&lt;br&gt;foo(). Hope this could be of interest (regarding all the bogus examples 
&lt;br&gt;I found including the computed assignment variation).
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Christian
&lt;br&gt;&lt;br&gt;&lt;br&gt;Gabriel Dos Reis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 9:29 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539562&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; I think I understand your point. dest[b] has 0 size because there were 0
&lt;br&gt;&amp;gt;&amp;gt; matching elements, correct ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yes. &amp;nbsp;That is also the size that dest[b] would have reported if
&lt;br&gt;&amp;gt; dest was const. &amp;nbsp;E.g. modifying you earlier program, run this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #include &amp;lt;valarray&amp;gt;
&lt;br&gt;&amp;gt; #include &amp;lt;iostream&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; using namespace std;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; int main(void)
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;int n = 1;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;const valarray&amp;lt;int&amp;gt; &amp;nbsp;dest(n);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;valarray&amp;lt;bool&amp;gt; b(false, n);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; dest[b].size() &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;return 0;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; your definition of size of dest[b] is the
&lt;br&gt;&amp;gt;&amp;gt; number of true elements.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; yes (and dest and b are already required to have same length).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; What I found really strange with this interpretation is that the legality of
&lt;br&gt;&amp;gt;&amp;gt; the program depends on a runtime behavior
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; That is precisely what the Standard says 'undefined behaviour' as opposed
&lt;br&gt;&amp;gt; to 'ill-formed' -- we don't say &amp;quot;legal&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There is nothing strange about it. &amp;nbsp;Not everything can be determined
&lt;br&gt;&amp;gt; at compile time; most interesting stuff happen at run time.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; for instance if the boolean's value is not known at compile time, like with
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt; b[0] = foo(); // with extern bool foo (void);
&lt;br&gt;&amp;gt;&amp;gt; dest[b] = src;
&lt;br&gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is this legal or not ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; whether the above invokes undefined behaviour depends on the
&lt;br&gt;&amp;gt; value of b[0] and the length of src.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;that's quite disturbing :-(
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Not to me. &amp;nbsp;Do you find it disturbing that
&lt;br&gt;&amp;gt; the validity &amp;nbsp;of
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; int a, b;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; return a / b;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; depends on the state of 'cin'?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Gaby
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26539562.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26532370</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-26T09:06:50Z</published>
	<updated>2009-11-26T09:06:50Z</updated>
	<author>
		<name>Gabriel Dos Reis</name>
	</author>
	<content type="html">On Thu, Nov 26, 2009 at 9:29 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26532370&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I think I understand your point. dest[b] has 0 size because there were 0
&lt;br&gt;&amp;gt; matching elements, correct ?
&lt;br&gt;&lt;br&gt;Yes. &amp;nbsp;That is also the size that dest[b] would have reported if
&lt;br&gt;dest was const. &amp;nbsp;E.g. modifying you earlier program, run this:
&lt;br&gt;&lt;br&gt;&lt;br&gt;#include &amp;lt;valarray&amp;gt;
&lt;br&gt;#include &amp;lt;iostream&amp;gt;
&lt;br&gt;&lt;br&gt;using namespace std;
&lt;br&gt;&lt;br&gt;int main(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;int n = 1;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;const valarray&amp;lt;int&amp;gt; &amp;nbsp;dest(n);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;valarray&amp;lt;bool&amp;gt; b(false, n);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;std::cout &amp;lt;&amp;lt; dest[b].size() &amp;lt;&amp;lt; std::endl;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;return 0;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; your definition of size of dest[b] is the
&lt;br&gt;&amp;gt; number of true elements.
&lt;br&gt;&lt;br&gt;yes (and dest and b are already required to have same length).
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What I found really strange with this interpretation is that the legality of
&lt;br&gt;&amp;gt; the program depends on a runtime behavior
&lt;br&gt;&lt;br&gt;That is precisely what the Standard says 'undefined behaviour' as opposed
&lt;br&gt;to 'ill-formed' -- we don't say &amp;quot;legal&amp;quot;.
&lt;br&gt;&lt;br&gt;There is nothing strange about it. &amp;nbsp;Not everything can be determined
&lt;br&gt;at compile time; most interesting stuff happen at run time.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; for instance if the boolean's value is not known at compile time, like with
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; b[0] = foo(); // with extern bool foo (void);
&lt;br&gt;&amp;gt; dest[b] = src;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is this legal or not ?
&lt;br&gt;&lt;br&gt;whether the above invokes undefined behaviour depends on the
&lt;br&gt;value of b[0] and the length of src.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;that's quite disturbing :-(
&lt;br&gt;&lt;br&gt;Not to me. &amp;nbsp;Do you find it disturbing that
&lt;br&gt;the validity &amp;nbsp;of
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; int a, b;
&lt;br&gt;&amp;nbsp; &amp;nbsp; cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b;
&lt;br&gt;&amp;nbsp; &amp;nbsp; return a / b;
&lt;br&gt;&lt;br&gt;depends on the state of 'cin'?
&lt;br&gt;&lt;br&gt;-- Gaby
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26532370.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26532161</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-26T08:52:11Z</published>
	<updated>2009-11-26T08:52:11Z</updated>
	<author>
		<name>Christopher Jefferson</name>
	</author>
	<content type="html">&lt;br&gt;On 26 Nov 2009, at 15:29, Christian BRUEL wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I think I understand your point. dest[b] has 0 size because there were 0 matching elements, correct ? your definition of size of dest[b] is the number of true elements.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What I found really strange with this interpretation is that the legality of the program depends on a runtime behavior
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; for instance if the boolean's value is not known at compile time, like with
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; b[0] = foo(); // with extern bool foo (void);
&lt;br&gt;&amp;gt; dest[b] = src;
&lt;br&gt;&amp;gt; ...
&lt;/div&gt;&lt;br&gt;That surely isn't surprising at all, is this really dissimilar to:
&lt;br&gt;&lt;br&gt;vector&amp;lt;int&amp;gt; v(foo());
&lt;br&gt;v[1] = 1;
&lt;br&gt;&lt;br&gt;Chris
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26532161.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531057</id>
	<title>Re: [[patch] valarray (was Re: valarray_copy implementation question)</title>
	<published>2009-11-26T07:29:18Z</published>
	<updated>2009-11-26T07:29:18Z</updated>
	<author>
		<name>Christian BRUEL</name>
	</author>
	<content type="html">I think I understand your point. dest[b] has 0 size because there were 0 
&lt;br&gt;matching elements, correct ? your definition of size of dest[b] is the 
&lt;br&gt;number of true elements.
&lt;br&gt;&lt;br&gt;What I found really strange with this interpretation is that the 
&lt;br&gt;legality of the program depends on a runtime behavior
&lt;br&gt;&lt;br&gt;for instance if the boolean's value is not known at compile time, like with
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;b[0] = foo(); // with extern bool foo (void);
&lt;br&gt;dest[b] = src;
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;Is this legal or not ? that's quite disturbing :-( I know a couple of 
&lt;br&gt;proprietary and commercial testsuite that fail on this kind of test. 
&lt;br&gt;(having n true elements &amp;lt; at the size of src).
&lt;br&gt;&lt;br&gt;Thanks so much and sorry for the noise.
&lt;br&gt;&lt;br&gt;Christian
&lt;br&gt;&lt;br&gt;&lt;br&gt;Gabriel Dos Reis wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 5:58 AM, Christian BRUEL &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531057&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;christian.bruel@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; what about
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; #include &amp;lt;valarray&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; using namespace std;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; int main(void)
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;int n = 1;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;valarray&amp;lt;int&amp;gt; &amp;nbsp;dest(n);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;valarray&amp;lt;bool&amp;gt; b(false, n);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;valarray&amp;lt;int&amp;gt; &amp;nbsp;src(1, n);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;dest[b] = src;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Christian,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; the array expression `dest[b]' has length 0; the array expression `src'
&lt;br&gt;&amp;gt; has length 1. &amp;nbsp;That violates the equal length precondition.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;return 0;
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; is it a user error also ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; yes; it is user confusion; the same as we discussed before.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- Gaby
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/valarray_copy-implementation-question-tp26373878p26531057.html" />
</entry>

</feed>
