<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.gcc.libstdc++.devel">
    <title>gmane.comp.gcc.libstdc++.devel</title>
    <link>http://blog.gmane.org/gmane.comp.gcc.libstdc++.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24345"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24338"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24316"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24283"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24279"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24276"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24267"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24261"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24260"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24257"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24251"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24248"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24243"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24238"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24237"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24236"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24234"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24231"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24224"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24219"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24345">
    <title>Fix stable_sort to work on iterators returning rvalue</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24345</link>
    <description>&lt;pre&gt;Hi

     The issues I had when trying to use stable_sort with move_iterator 
was in fact not all coming from a missing swap overload. In fact 
stable_sort do not accept iterators with dereference operator returning 
pure rvalue. I use std::vector&amp;lt;bool&amp;gt;::iterator to illustrate this 
problem. The problem was in fact coming from 
__uninitialized_construct_buf that was taking a lvalue reference. I 
simply modify the function and the underlying helper struct to 
dereference the iterator as late as possible that is to say only when we 
need to pass it to the std::move function.

2012-05-25  François Dumont &amp;lt;fdumont&amp;lt; at &amp;gt;gcc.gnu.org&amp;gt;

     * include/bits/stl_tempbuf.h (__uninitialized_construct_buf)
     (__uninitialized_construct_buf_dispatch&amp;lt;&amp;gt;::__ucr): Fix to work
     with iterator returning rvalue.
     * testsuite/25_algorithms/stable_sort/3.cc: New.

Tested under x86_64 linux with make check and make CXXFLAGS=-std=c++11 
check.

Ok to commit ?

François
&lt;/pre&gt;</description>
    <dc:creator>François Dumont</dc:creator>
    <dc:date>2012-05-25T20:42:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24338">
    <title>iter_swap on move_iterator</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24338</link>
    <description>&lt;pre&gt;Hi

     While working on removal of code duplications in algos 
implementation I challenge them with move_iterator. I started with 
stable_sort and it doesn't compile. I summarize the problem to the fact 
that iter_swap can't be used on move_iterator. As, in C++11, iter_swap 
simply forward to swap(*__a, *__b) it is normal that it can't accept 
rvalue but shouldn't iter_swap be adapted to accept move_iterator ?

     I also find the compilation error message surprising. I have added 
a call to iter_swap in 24_iterators/move_iterator/greedy_ops.cc and the 
error message is:

In file included from 
/home/fdt/dev/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/char_traits.h:41:0, 

                  from 
/home/fdt/dev/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ios:41, 

                  from 
/home/fdt/dev/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ostream:40, 

                  from 
/home/fdt/dev/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/iterator:64, 

                  from 
/home/fdt/dev/gcc/libstdc++-v3/testsuite/24_iterators/move_iterator/greedy_ops.cc:20: 

/home/fdt/dev/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h: 
In instantiation of 'void std::iter_swap(_ForwardIterator1, 
_ForwardIterator2) [with _ForwardIterator1 = 
std::move_iterator&amp;lt;greedy_ops::X*&amp;gt;; _ForwardIterator2 = 
std::move_iterator&amp;lt;greedy_ops::X*&amp;gt;]':
/home/fdt/dev/gcc/libstdc++-v3/testsuite/24_iterators/move_iterator/greedy_ops.cc:39:24:   
required from here
/home/fdt/dev/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/stl_algobase.h:148:7: 
error: no matching function for call to 
'swap(std::move_iterator&amp;lt;greedy_ops::X*&amp;gt;::value_type, 
std::move_iterator&amp;lt;greedy_ops::X*&amp;gt;::value_type)'
        swap(*__a, *__b);
        ^

Why is the comipiler talking about a call to swap on 
move_iterator&amp;lt;greedy_ops::X*&amp;gt;::value_type. It should be on the return 
type of move_iterator operator* which is move_iterator&amp;lt;&amp;gt;::reference, no ?

François


&lt;/pre&gt;</description>
    <dc:creator>François Dumont</dc:creator>
    <dc:date>2012-05-17T17:53:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24316">
    <title>[v3] fix libstdc++/53263</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24316</link>
    <description>&lt;pre&gt;Here is a patch for PR 53263.

I have also generalize the idea of performing checks on unsafe iterators 
for better performance to several other debug checks.

2012-05-09  François Dumont &amp;lt;fdumont&amp;lt; at &amp;gt;gcc.gnu.org&amp;gt;

     PR libstdc++/53263
     * include/debug/safe_iterator.h (__gnu_debug::__base): Move...
     * include/debug/functions.h: ... Here. Add debug function
     overloads to perform checks on normal iterators when possible.
     * include/debug/macros.h (__glibcxx_check_heap,
     __glibcxx_check_heap_pred): Use __gnu_debug::__base on iterator range.


Tested under linux x86_64 debug mode.

Ok for trunk and 4.7 branch ?

François

&lt;/pre&gt;</description>
    <dc:creator>François Dumont</dc:creator>
    <dc:date>2012-05-09T21:02:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24283">
    <title>Thoughts on supporting the C++11 thread library on Windows</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24283</link>
    <description>&lt;pre&gt;For GCC 4.7 I enabled most of &amp;lt;thread&amp;gt; (without timed mutexes) on Mac
OS X by making the _GLIBCXX_HAS_GTHREADS macro more fine-grained.  I
think we could quite easily do the same again for the win32 thread
model (defined in gthr-win32.h) so that &amp;lt;thread&amp;gt; and &amp;lt;mutex&amp;gt; are
available (including timed mutexes), but without &amp;lt;condition_variable&amp;gt;
and &amp;lt;future&amp;gt;.

It's harder to support &amp;lt;condition_variable&amp;gt; because Windows didn't
provide condition variables until Vista, and even then they interact
with a CRITICAL_SECTION and gthr-win32.h defines mutexes in terms of a
semaphore not a critical section.  Douglas Schmidt describes an
implementation of condition variables at
http://www.cs.wustl.edu/~schmidt/win32-cv-1.html but that also
requires mutexes to be critical sections - maybe that could be adapted
to use the gthr-win32.h semaphore-based definition of
__gthread_mutex_t, I haven't looked into it in detail.   My suggestion
would be to support &amp;lt;thread&amp;gt; and &amp;lt;mutex&amp;gt; but not &amp;lt;condition_variable&amp;gt;
(or &amp;lt;future&amp;gt; because our implementation uses a
std::condition_variable.)  I have some untested implementations of
__gthread_create, __gthread_join etc. if anyone wants to work on
implementing that suggestion.  I don't have a Windows machine or
enough free time to do that myself in the near future.

As a second idea, supporting the full C++11 thread library could be
done by creating a new thread model to be used instead of win32, which
would only be supported on Vista or later and would use Windows
critical sections for std::mutex and Windows  condition variables for
std::condition_variable.  Critical sections don't support a timed
wait, so that thread model would be similar to the Mac OS X support
and omit timed mutexes.  That could easily be solved by implementing
std::timed_mutex as a Windows mutex instead of a critical section, but
that would be difficult in the current Gthreads design because it
follows POSIX and assumes that a timed mutex is exactly the same type
as a non-timed mutex and you just use a different function to wait.
We should consider adding a __gthread_timed_mutex type which can be
different to __gthread_mutex_t, but would be the same type on POSIX
platforms that support the Timeouts option and define
pthread_mutex_timedlock.   Again, I have some sketches to make that
work but nothing concrete.

If there are any Windows hackers out there who want to improve thread
support on their platform please get in touch, I'll be happy to help
and advise (although not for the next two weeks as I'm about to go on
holiday.)

&lt;/pre&gt;</description>
    <dc:creator>Jonathan Wakely</dc:creator>
    <dc:date>2012-05-05T22:59:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24279">
    <title>GNU Tools Cauldron 2012 - Hotels and registered presentations</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24279</link>
    <description>&lt;pre&gt;
An update on the GNU Tools Cauldron (http://gcc.gnu.org/wiki/cauldron2012)

We have published an initial schedule for the workshop.  It is
available at http://gcc.gnu.org/wiki/cauldron2012.

Presenters, please double-check your entries.  If you find
anything missing or wrong, please contact me and I will correct
it.


Thank you.

&lt;/pre&gt;</description>
    <dc:creator>Diego Novillo</dc:creator>
    <dc:date>2012-05-03T20:05:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24276">
    <title>[v3] doxygen markup for template parameters</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24276</link>
    <description>&lt;pre&gt;
In libstdc++/44015, there is a request for doxygen markup on template
parameters, including default arguments. This is a kind of markup that
libstdc++ has mostly not done, or done inconsistently.

So, here's how I think it should be done, at least for io and
containers. 

See generated files here:
http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html

tested x86/linux

-benjamin&lt;/pre&gt;</description>
    <dc:creator>Benjamin De Kosnik</dc:creator>
    <dc:date>2012-05-03T16:29:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24267">
    <title>[v3] hashtable fw decl fix</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24267</link>
    <description>&lt;pre&gt;
This patchlette needed for versioned builds, just makes
declaration/foward declaration consistent.

-benjamin

tested x86/linux
tested x86/linux versioned namespaces&lt;/pre&gt;</description>
    <dc:creator>Benjamin De Kosnik</dc:creator>
    <dc:date>2012-05-02T16:38:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24261">
    <title>[v3] Completely fix libstdc++/51795 in mainline</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24261</link>
    <description>&lt;pre&gt;Hi,

contributed by Marc (thanks Again!) and integrated by me. Tested 
x86_64-linux, multilib. Committed to mainline.

Thanks,
Paolo.

///////////////////////////
2012-04-29  Marc Glisse  &amp;lt;marc.glisse&amp;lt; at &amp;gt;inria.fr&amp;gt;
    Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR libstdc++/51795
* include/bits/stl_algobase.h (__lg&amp;lt;&amp;gt;(_Size)): Remove.
(__lg(int), __lg(unsigned), __lg(long), __lg(unsigned long),
__lg(long long), __lg(unsigned long long)): Define constexpr.
* include/bits/random.h (_Mod&amp;lt;&amp;gt;): Overcome Schrage's algorithm
limitations.
(__mod): Adjust.
(linear_congruential): Remove FIXME static_assert.
* include/bits/random.tcc (_Mod&amp;lt;&amp;gt;): Adjust.
* testsuite/26_numerics/random/linear_congruential_engine/operators/
51795.cc: New.
Index: include/bits/stl_algobase.h
===================================================================
--- include/bits/stl_algobase.h(revision 186943)
+++ include/bits/stl_algobase.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -975,37 +975,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
   /// This is a helper function for the sort routines and for random.tcc.
   //  Precondition: __n &amp;gt; 0.
-  template&amp;lt;typename _Size&amp;gt;
-    inline _Size
-    __lg(_Size __n)
-    {
-      _Size __k;
-      for (__k = 0; __n != 0; __n &amp;gt;&amp;gt;= 1)
-++__k;
-      return __k - 1;
-    }
-
-  inline int
+  inline _GLIBCXX_CONSTEXPR int
   __lg(int __n)
   { return sizeof(int) * __CHAR_BIT__  - 1 - __builtin_clz(__n); }
 
-  inline unsigned
+  inline _GLIBCXX_CONSTEXPR unsigned
   __lg(unsigned __n)
   { return sizeof(int) * __CHAR_BIT__  - 1 - __builtin_clz(__n); }
 
-  inline long
+  inline _GLIBCXX_CONSTEXPR long
   __lg(long __n)
   { return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
 
-  inline unsigned long
+  inline _GLIBCXX_CONSTEXPR unsigned long
   __lg(unsigned long __n)
   { return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
 
-  inline long long
+  inline _GLIBCXX_CONSTEXPR long long
   __lg(long long __n)
   { return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
 
-  inline unsigned long long
+  inline _GLIBCXX_CONSTEXPR unsigned long long
   __lg(unsigned long long __n)
   { return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
 
Index: include/bits/random.tcc
===================================================================
--- include/bits/random.tcc(revision 186943)
+++ include/bits/random.tcc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -41,59 +41,43 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   {
   _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
-    // General case for x = (ax + c) mod m -- use Schrage's algorithm to
-    // avoid integer overflow.
+    // General case for x = (ax + c) mod m -- use Schrage's algorithm
+    // to avoid integer overflow.
     //
-    // Because a and c are compile-time integral constants the compiler
-    // kindly elides any unreachable paths.
-    //
     // Preconditions:  a &amp;gt; 0, m &amp;gt; 0.
     //
-    // XXX FIXME: as-is, only works correctly for __m % __a &amp;lt; __m / __a. 
-    //
-    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool&amp;gt;
-      struct _Mod
+    // Note: only works correctly for __m % __a &amp;lt; __m / __a.
+    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c&amp;gt;
+      _Tp
+      _Mod&amp;lt;_Tp, __m, __a, __c, false, true&amp;gt;::
+      __calc(_Tp __x)
       {
-static _Tp
-__calc(_Tp __x)
-{
-  if (__a == 1)
-    __x %= __m;
-  else
-    {
-      static const _Tp __q = __m / __a;
-      static const _Tp __r = __m % __a;
+if (__a == 1)
+  __x %= __m;
+else
+  {
+    static const _Tp __q = __m / __a;
+    static const _Tp __r = __m % __a;
 
-      _Tp __t1 = __a * (__x % __q);
-      _Tp __t2 = __r * (__x / __q);
-      if (__t1 &amp;gt;= __t2)
-__x = __t1 - __t2;
-      else
-__x = __m - __t2 + __t1;
-    }
+    _Tp __t1 = __a * (__x % __q);
+    _Tp __t2 = __r * (__x / __q);
+    if (__t1 &amp;gt;= __t2)
+      __x = __t1 - __t2;
+    else
+      __x = __m - __t2 + __t1;
+  }
 
-  if (__c != 0)
-    {
-      const _Tp __d = __m - __x;
-      if (__d &amp;gt; __c)
-__x += __c;
-      else
-__x = __c - __d;
-    }
-  return __x;
-}
-      };
+if (__c != 0)
+  {
+    const _Tp __d = __m - __x;
+    if (__d &amp;gt; __c)
+      __x += __c;
+    else
+      __x = __c - __d;
+  }
+return __x;
+      }
 
-    // Special case for m == 0 -- use unsigned integer overflow as modulo
-    // operator.
-    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c&amp;gt;
-      struct _Mod&amp;lt;_Tp, __m, __a, __c, true&amp;gt;
-      {
-static _Tp
-__calc(_Tp __x)
-{ return __a * __x + __c; }
-      };
-
     template&amp;lt;typename _InputIterator, typename _OutputIterator,
      typename _UnaryOperation&amp;gt;
       _OutputIterator
Index: include/bits/random.h
===================================================================
--- include/bits/random.h(revision 186943)
+++ include/bits/random.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -76,15 +76,78 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
       struct _Shift&amp;lt;_UIntType, __w, true&amp;gt;
       { static const _UIntType __value = _UIntType(1) &amp;lt;&amp;lt; __w; };
 
-    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool&amp;gt;
-      struct _Mod;
+    template&amp;lt;int __s,
+     int __which = ((__s &amp;lt;= __CHAR_BIT__ * sizeof (int))
+    + (__s &amp;lt;= __CHAR_BIT__ * sizeof (long))
+    + (__s &amp;lt;= __CHAR_BIT__ * sizeof (long long))
+    /* assume long long no bigger than __int128 */
+    + (__s &amp;lt;= 128))&amp;gt;
+      struct _Select_uint_least_t
+      {
+static_assert(__which &amp;lt; 0, /* needs to be dependent */
+      "sorry, would be too much trouble for a slow result");
+      };
 
-    // Dispatch based on modulus value to prevent divide-by-zero compile-time
-    // errors when m == 0.
+    template&amp;lt;int __s&amp;gt;
+      struct _Select_uint_least_t&amp;lt;__s, 4&amp;gt;
+      { typedef unsigned int type; };
+
+    template&amp;lt;int __s&amp;gt;
+      struct _Select_uint_least_t&amp;lt;__s, 3&amp;gt;
+      { typedef unsigned long type; };
+
+    template&amp;lt;int __s&amp;gt;
+      struct _Select_uint_least_t&amp;lt;__s, 2&amp;gt;
+      { typedef unsigned long long type; };
+
+#ifdef _GLIBCXX_USE_INT128
+    template&amp;lt;int __s&amp;gt;
+      struct _Select_uint_least_t&amp;lt;__s, 1&amp;gt;
+      { typedef unsigned __int128 type; };
+#endif
+
+    // Assume a != 0, a &amp;lt; m, c &amp;lt; m, x &amp;lt; m.
+    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c,
+     bool __big_enough = (!(__m &amp;amp; (__m - 1))
+  || (_Tp(-1) - __c) / __a &amp;gt;= __m - 1),
+             bool __schrage_ok = __m % __a &amp;lt; __m / __a&amp;gt;
+      struct _Mod
+      {
+typedef typename _Select_uint_least_t&amp;lt;std::__lg(__a)
+      + std::__lg(__m) + 2&amp;gt;::type _Tp2;
+static _Tp
+__calc(_Tp __x)
+{ return static_cast&amp;lt;_Tp&amp;gt;((_Tp2(__a) * __x + __c) % __m); }
+      };
+
+    // Schrage.
+    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c&amp;gt;
+      struct _Mod&amp;lt;_Tp, __m, __a, __c, false, true&amp;gt;
+      {
+static _Tp
+__calc(_Tp __x);
+      };
+
+    // Special cases:
+    // - for m == 2^n or m == 0, unsigned integer overflow is safe.
+    // - a * (m - 1) + c fits in _Tp, there is no overflow.
+    template&amp;lt;typename _Tp, _Tp __m, _Tp __a, _Tp __c, bool __s&amp;gt;
+      struct _Mod&amp;lt;_Tp, __m, __a, __c, true, __s&amp;gt;
+      {
+static _Tp
+__calc(_Tp __x)
+{
+  _Tp __res = __a * __x + __c;
+  if (__m)
+    __res %= __m;
+  return __res;
+}
+      };
+
     template&amp;lt;typename _Tp, _Tp __m, _Tp __a = 1, _Tp __c = 0&amp;gt;
       inline _Tp
       __mod(_Tp __x)
-      { return _Mod&amp;lt;_Tp, __m, __a, __c, __m == 0&amp;gt;::__calc(__x); }
+      { return _Mod&amp;lt;_Tp, __m, __a, __c&amp;gt;::__calc(__x); }
 
     /*
      * An adaptor class for converting the output of any Generator into
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -174,11 +237,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
       static_assert(__m == 0u || (__a &amp;lt; __m &amp;amp;&amp;amp; __c &amp;lt; __m),
     "template argument substituting __m out of bounds");
 
-      // XXX FIXME:
-      // _Mod::__calc should handle correctly __m % __a &amp;gt;= __m / __a too.
-      static_assert(__m % __a &amp;lt; __m / __a,
-    "sorry, not implemented yet: try a smaller 'a' constant");
-
     public:
       /** The type of the generated random value. */
       typedef _UIntType result_type;
Index: testsuite/26_numerics/random/linear_congruential_engine/operators/51795.cc
===================================================================
--- testsuite/26_numerics/random/linear_congruential_engine/operators/51795.cc(revision 0)
+++ testsuite/26_numerics/random/linear_congruential_engine/operators/51795.cc(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,45 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// { dg-options "-std=gnu++11" }
+// { dg-require-cstdint "" }
+//
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+
+// 26.5.3.1 class template linear_congruential_engine [rand.eng.lcong]
+
+#include &amp;lt;random&amp;gt;
+#include &amp;lt;testsuite_hooks.h&amp;gt;
+
+void test01()
+{
+  bool test __attribute__((unused)) = true;
+
+  typedef std::linear_congruential_engine&amp;lt;std::uint64_t, 1103515245ULL,
+  12345, 2147483648ULL&amp;gt; engine;
+  engine eng(1103527590ULL);
+
+  for (unsigned it = 0; it &amp;lt; 1000; ++it)
+    {
+      std::uint64_t num = eng();
+      VERIFY( (num &amp;gt;= eng.min() &amp;amp;&amp;amp; num &amp;lt;= eng.max()) );
+    }
+}
+
+int main()
+{
+  test01();
+  return 0;
+}
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-04-29T23:37:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24260">
    <title>[v3] constrain std::function constructor to only accept callable types</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24260</link>
    <description>&lt;pre&gt;Currently we only constrain std::function's constructor to reject
integral arguments, this patch changes it to reject non-callable
arguments.  This is the proposed resolution of LWG 2132, I had already
planned to do this anyway before the issue was opened so I don't see
any need to wait for a DR.

        * include/std/functional (function::function(F)): LWG 2132: Disable
        constructor if argument isn't callable.
        * testsuite/20_util/function/cons/callable.cc: New.

Tested x86_64-linux, committed to trunk.
commit 0e069c4221d6ed4fda7d10938470c472170dcad7
Author: Jonathan Wakely &amp;lt;jwakely.gcc&amp;lt; at &amp;gt;gmail.com&amp;gt;
Date:   Tue Feb 14 22:22:48 2012 +0000

    * include/std/functional (function::function(F)): LWG 2132: Disable
    constructor if argument isn't callable.
    * testsuite/20_util/function/cons/callable.cc: New.

diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 980c6ab..0edb4f1 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1856,7 +1856,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
       {
 typedef _Function_base::_Base_manager&amp;lt;_Functor*&amp;gt; _Base;
 
-    public:
+      public:
 static bool
 _M_manager(_Any_data&amp;amp; __dest, const _Any_data&amp;amp; __source,
    _Manager_operation __op)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1994,7 +1994,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
       typedef _Simple_type_wrapper&amp;lt;_Functor&amp;gt; _Wrapper;
       typedef _Function_base::_Base_manager&amp;lt;_Wrapper&amp;gt; _Base;
 
-     public:
+    public:
       static bool
       _M_manager(_Any_data&amp;amp; __dest, const _Any_data&amp;amp; __source,
  _Manager_operation __op)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2038,7 +2038,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
     {
       typedef _Res _Signature_type(_ArgTypes...);
 
-      struct _Useless { };
+      template&amp;lt;typename _Functor&amp;gt;
+using _Invoke = decltype(__callable_functor(std::declval&amp;lt;_Functor&amp;amp;&amp;gt;())
+ (std::declval&amp;lt;_ArgTypes&amp;gt;()...) );
+
+      template&amp;lt;typename _CallRes, typename _Res1&amp;gt;
+struct _CheckResult
+: is_convertible&amp;lt;_CallRes, _Res1&amp;gt; { };
+
+      template&amp;lt;typename _CallRes&amp;gt;
+struct _CheckResult&amp;lt;_CallRes, void&amp;gt;
+: true_type { };
+
+      template&amp;lt;typename _Functor&amp;gt;
+using _Callable = _CheckResult&amp;lt;_Invoke&amp;lt;_Functor&amp;gt;, _Res&amp;gt;;
+
+      template&amp;lt;typename _Cond, typename _Tp&amp;gt;
+using _Requires = typename enable_if&amp;lt;_Cond::value, _Tp&amp;gt;::type;
 
     public:
       typedef _Res result_type;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2099,11 +2115,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
        *  If &amp;lt; at &amp;gt;a __f is a non-NULL function pointer or an object of type &amp;lt; at &amp;gt;c
        *  reference_wrapper&amp;lt;F&amp;gt;, this function will not throw.
        */
-      template&amp;lt;typename _Functor&amp;gt;
-function(_Functor __f,
- typename enable_if&amp;lt;
-   !is_integral&amp;lt;_Functor&amp;gt;::value, _Useless&amp;gt;::type
-   = _Useless());
+      template&amp;lt;typename _Functor,
+       typename = _Requires&amp;lt;_Callable&amp;lt;_Functor&amp;gt;, void&amp;gt;&amp;gt;
+function(_Functor);
 
       /**
        *  &amp;lt; at &amp;gt;brief %Function assignment operator.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2178,7 +2192,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
        *  reference_wrapper&amp;lt;F&amp;gt;, this function will not throw.
        */
       template&amp;lt;typename _Functor&amp;gt;
-typename enable_if&amp;lt;!is_integral&amp;lt;_Functor&amp;gt;::value, function&amp;amp;&amp;gt;::type
+_Requires&amp;lt;_Callable&amp;lt;_Functor&amp;gt;, function&amp;amp;&amp;gt;
 operator=(_Functor&amp;amp;&amp;amp; __f)
 {
   function(std::forward&amp;lt;_Functor&amp;gt;(__f)).swap(*this);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2187,7 +2201,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
 
       /// &amp;lt; at &amp;gt;overload
       template&amp;lt;typename _Functor&amp;gt;
-typename enable_if&amp;lt;!is_integral&amp;lt;_Functor&amp;gt;::value, function&amp;amp;&amp;gt;::type
+function&amp;amp;
 operator=(reference_wrapper&amp;lt;_Functor&amp;gt; __f) noexcept
 {
   function(__f).swap(*this);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2294,11 +2308,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(result_type)
     }
 
   template&amp;lt;typename _Res, typename... _ArgTypes&amp;gt;
-    template&amp;lt;typename _Functor&amp;gt;
+    template&amp;lt;typename _Functor, typename&amp;gt;
       function&amp;lt;_Res(_ArgTypes...)&amp;gt;::
-      function(_Functor __f,
-       typename enable_if&amp;lt;
-!is_integral&amp;lt;_Functor&amp;gt;::value, _Useless&amp;gt;::type)
+      function(_Functor __f)
       : _Function_base()
       {
 typedef _Function_handler&amp;lt;_Signature_type, _Functor&amp;gt; _My_handler;
diff --git a/libstdc++-v3/testsuite/20_util/function/cons/callable.cc b/libstdc++-v3/testsuite/20_util/function/cons/callable.cc
new file mode 100644
index 0000000..209c404
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/function/cons/callable.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,51 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+
+#include &amp;lt;functional&amp;gt;
+#include &amp;lt;testsuite_hooks.h&amp;gt;
+
+void* f(std::function&amp;lt;void()&amp;gt;) { return nullptr; }
+int f(std::function&amp;lt;void(int)&amp;gt;) { return 1; }
+
+void test01()
+{
+  void* p __attribute__((unused));
+  int i __attribute__((unused));
+
+  p = f([] { });
+  i = f([] (int) { });
+}
+
+void g(std::function&amp;lt;void()&amp;gt;) { }
+void h(std::function&amp;lt;int(int)&amp;gt;) { }
+
+void test02()
+{
+  g([] { return "ignored"; });
+  h([] (char c) { return c; });
+}
+
+int main()
+{
+  test01();
+  test02();
+
+  return 0;
+}
&lt;/pre&gt;</description>
    <dc:creator>Jonathan Wakely</dc:creator>
    <dc:date>2012-04-29T23:16:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24257">
    <title>PR 53115</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24257</link>
    <description>&lt;pre&gt;Hi

     Here is the patch for this PR. We were using buckets before 
updating them after having inserted equivalents elements one after the 
another.

2012-04-29  François Dumont &amp;lt;fdumont&amp;lt; at &amp;gt;gcc.gnu.org&amp;gt;

     PR libstdc++/53115
     * include/bits/hashtable.h
     (_Hashtable&amp;lt;&amp;gt;::_M_rehash_aux(size_type, false_type)): Fix buckets
     after insertion of several equivalent elements.
     * testsuite/23_containers/unordered_multiset/insert/53115.cc: New.

     Tested undex linux x86_64 in the 4.7 branch, normal and debug mode.

     Ok to commit ?

François
&lt;/pre&gt;</description>
    <dc:creator>François Dumont</dc:creator>
    <dc:date>2012-04-29T10:21:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24251">
    <title>Remove algo code duplication</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24251</link>
    <description>&lt;pre&gt;Hi

     Here is an other attempt to remove duplication of code in 
implementation of Standard algos. There are several enhancements on the 
last proposal:

1. No usage of C++11 lambdas anymore, code works fine in C++98 and code 
has been really deleted this time. About 700 lines removed in stl_algo.h 
for instance.

2. Compatible with existing code, code submitted by Christopher last 
time will still compile. To do so I used 
std::iterator_traits&amp;lt;&amp;gt;::reference type so that if the iterator is not 
const then the operator do not have to take const reference or to be 
const qualified neither. For the same reason I have also avoided some 
const qualifiers on the introduced functors.

3. It is less complex than in libstdcxx_so_7 branch: Introduced functors 
always have one operator() so that ambiguity between different overloads 
is impossible. To do so I used 2 techniques:
     - For equal_range and lexicographical_compare algos, the ones that 
really need 2 overloads, I simply pass 2 functors, one to do lhs &amp;lt; rhs 
and one for rhs &amp;lt; lhs; when the functor comes from the user code it is 
the same that is passed twice.
     - In other more complex situation where an algorithm calls other 
internal algos resulting in the functor being called with potentially 
many slightly different parameter types I use a rebind technique. When 
there is a call to an internal algo that need a specific functor 
signature I rebind the input functor to match it. In _RebindHelper I 
detect when the functor is my newly introduced __gnu_cxx::__ops::less 
functor and change it in this case, otherwise it remains unchanged.

In libstdcxx_so_7 branch the algo version using operators was calling 
the version taking a functor. The result was that concept checks on the 
operator version was performed twice. It is not a big concern when it is 
really pure concept checks but in trunk there is also the debug checks 
that can be quite expensive, checking that a range is sorted for 
instance. So I prefer to introduce an internal implementation that 
contains only the algo implementation without any concept checks and 
have it call from the Standard algos. Those pure implementations are 
also the one used for internal purpose.

Note that doing this job I introduce 2 small unrelated changes:
- __move_merge used to have 2 template iterator types but was called 
only with one, I simplify it.
- __unguarded_partition used to have 3 template parameters: 
_RandomAccessIterator, _Tp and _Compare. It was taking a const reference 
to _Tp which was a useless constraint for the functor. So it now only 
have 2 template parameters, const _Tp&amp;amp; has been replaced by 
iterator_traits&amp;lt;_RandomAccessIterator&amp;gt;::reference.

2012-04-27  François Dumont &amp;lt;fdumont&amp;lt; at &amp;gt;gcc.gnu.org&amp;gt;

     * include/bits/predefined_ops.h: New.
     * include/bits/stl_algobase.h: Use functors from latter file to remove
     duplication of algorithm implementation.
     * include/bits/stl_algo.h: Likewise.
     * include/bits/stl_heap.h: Likewise.
     * testsuite/25_algorithms/lexicographical_compare/2.cc: New.
     * testsuite/25_algorithms/lexicographical_compare/3.cc: New.
     * testsuite/25_algorithms/partial_sort_copy/3.cc: New.

Tested under linux x86_64 normal and debug mode.

François

&lt;/pre&gt;</description>
    <dc:creator>François Dumont</dc:creator>
    <dc:date>2012-04-28T08:01:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24248">
    <title>Default buffer size of class basic_filebuf</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24248</link>
    <description>&lt;pre&gt;Hello!

I want to figure out the default buffer-size of the class basic_filebuf.
I know the member function pubsetbuf() and it seems to have a great
impact on the performance during file copy.

Question: Where I can find the default buffer size for basic_filebuf?


The standard for C++ doesn't define a member function pubgetbuf() or
something like this, also the member function is_avail() doesn't help
either. I can't find any constant. I know BUFSIZ from &amp;lt;cstdio&amp;gt; and it
defaults on my machine to 8192 Bytes, which performs well for me with
fread()/fwrite() and read()/write().

I doing some testing on simple file copying:
http://stackoverflow.com/questions/10195343/copy-a-file-in-an-sane-safe-and-efficient-way

Thanks
Peter Weber
&lt;/pre&gt;</description>
    <dc:creator>Weber, Peter (Wilken GmbH</dc:creator>
    <dc:date>2012-04-27T11:45:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24243">
    <title>_GLIBCXX_USE_INT128</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24243</link>
    <description>&lt;pre&gt;Hello,

I was wondering if it would make sense to test __SIZEOF_INT128__ instead 
of having a configure test that defines _GLIBCXX_USE_INT128 
unconditionally. That would mostly help other compilers trying to use a 
libstdc++ that was installed with gcc.

__float128 doesn't seem to have such a macro that can be tested :-(

&lt;/pre&gt;</description>
    <dc:creator>Marc Glisse</dc:creator>
    <dc:date>2012-04-25T08:55:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24238">
    <title>[v3] libstdc++/53080</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24238</link>
    <description>&lt;pre&gt;Hi,

this is what I'm about to commit, pretty straightforward. Tested 
x86_64-linux.

Thanks,
Paolo.

///////////////////////////
2012-04-23  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR libstdc++/53080
* include/std/array (tuple_element, get): static_assert I &amp;lt; N.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
New.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/tuple_element.cc: Fix.
Index: include/std/array
===================================================================
--- include/std/array(revision 186692)
+++ include/std/array(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,6 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 // &amp;lt;array&amp;gt; -*- C++ -*-
 
-// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -261,23 +262,35 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     class tuple_element;
 
   template&amp;lt;std::size_t _Int, typename _Tp, std::size_t _Nm&amp;gt;
-    struct tuple_element&amp;lt;_Int, array&amp;lt;_Tp, _Nm&amp;gt; &amp;gt;
-    { typedef _Tp type; };
+    struct tuple_element&amp;lt;_Int, array&amp;lt;_Tp, _Nm&amp;gt;&amp;gt;
+    {
+      static_assert(_Int &amp;lt; _Nm, "index is out of bounds");
+      typedef _Tp type;
+    };
 
   template&amp;lt;std::size_t _Int, typename _Tp, std::size_t _Nm&amp;gt;
     constexpr _Tp&amp;amp;
     get(array&amp;lt;_Tp, _Nm&amp;gt;&amp;amp; __arr) noexcept
-    { return __arr._M_instance[_Int]; }
+    {
+      static_assert(_Int &amp;lt; _Nm, "index is out of bounds");
+      return __arr._M_instance[_Int];
+    }
 
   template&amp;lt;std::size_t _Int, typename _Tp, std::size_t _Nm&amp;gt;
     constexpr _Tp&amp;amp;&amp;amp;
     get(array&amp;lt;_Tp, _Nm&amp;gt;&amp;amp;&amp;amp; __arr) noexcept
-    { return std::move(get&amp;lt;_Int&amp;gt;(__arr)); }
+    {
+      static_assert(_Int &amp;lt; _Nm, "index is out of bounds");
+      return std::move(get&amp;lt;_Int&amp;gt;(__arr));
+    }
 
   template&amp;lt;std::size_t _Int, typename _Tp, std::size_t _Nm&amp;gt;
     constexpr const _Tp&amp;amp;
     get(const array&amp;lt;_Tp, _Nm&amp;gt;&amp;amp; __arr) noexcept
-    { return __arr._M_instance[_Int]; }
+    {
+      static_assert(_Int &amp;lt; _Nm, "index is out of bounds");
+      return __arr._M_instance[_Int];
+    }
 
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace
Index: testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
===================================================================
--- testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc(revision 0)
+++ testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,25 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+
+#include &amp;lt;array&amp;gt;
+
+typedef std::tuple_element&amp;lt;1, std::array&amp;lt;int, 1&amp;gt;&amp;gt;::type type;
+
+// { dg-error "static assertion failed" "" { target *-*-* } 267 }
Index: testsuite/23_containers/array/tuple_interface/tuple_element.cc
===================================================================
--- testsuite/23_containers/array/tuple_interface/tuple_element.cc(revision 186692)
+++ testsuite/23_containers/array/tuple_interface/tuple_element.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,6 +1,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 // { dg-options "-std=gnu++0x" }
 //
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,19 +27,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   bool test __attribute__((unused)) = true;
   using namespace std;
 
-  {
-    const size_t len = 3;
-    typedef array&amp;lt;int, len&amp;gt; array_type;
-    VERIFY( (is_same&amp;lt;tuple_element&amp;lt;0, array_type&amp;gt;::type, int&amp;gt;::value == true) );
-    VERIFY( (is_same&amp;lt;tuple_element&amp;lt;1, array_type&amp;gt;::type, int&amp;gt;::value == true) );
-    VERIFY( (is_same&amp;lt;tuple_element&amp;lt;2, array_type&amp;gt;::type, int&amp;gt;::value == true) );
-  }
-
-  {
-    const size_t len = 0;
-    typedef array&amp;lt;int, len&amp;gt; array_type;
-    VERIFY( (is_same&amp;lt;tuple_element&amp;lt;0, array_type&amp;gt;::type, int&amp;gt;::value == true) );
-  }
+  const size_t len = 3;
+  typedef array&amp;lt;int, len&amp;gt; array_type;
+  VERIFY( (is_same&amp;lt;tuple_element&amp;lt;0, array_type&amp;gt;::type, int&amp;gt;::value == true) );
+  VERIFY( (is_same&amp;lt;tuple_element&amp;lt;1, array_type&amp;gt;::type, int&amp;gt;::value == true) );
+  VERIFY( (is_same&amp;lt;tuple_element&amp;lt;2, array_type&amp;gt;::type, int&amp;gt;::value == true) );
 }
 
 int main()
Index: testsuite/23_containers/array/tuple_interface/get_neg.cc
===================================================================
--- testsuite/23_containers/array/tuple_interface/get_neg.cc(revision 0)
+++ testsuite/23_containers/array/tuple_interface/get_neg.cc(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,32 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+
+#include &amp;lt;array&amp;gt;
+
+std::array&amp;lt;int, 1&amp;gt; a{};
+const std::array&amp;lt;int, 1&amp;gt; ca{};
+
+int n1 = std::get&amp;lt;1&amp;gt;(a);
+int n2 = std::get&amp;lt;1&amp;gt;(std::move(a));
+int n3 = std::get&amp;lt;1&amp;gt;(ca);
+
+// { dg-error "static assertion failed" "" { target *-*-* } 275 }
+// { dg-error "static assertion failed" "" { target *-*-* } 283 }
+// { dg-error "static assertion failed" "" { target *-*-* } 291 }
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-04-23T11:24:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24237">
    <title>[testsuite] PR 53046</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24237</link>
    <description>&lt;pre&gt;Hi,

tested x86_64-linux, committed.

Paolo.

///////////////////
2012-04-23  Chris Jefferson  &amp;lt;chris&amp;lt; at &amp;gt;bubblescope.net&amp;gt;

PR testsuite/53046
* testsuite/25_algorithms/stable_partition/mem_check.cc: Fix size
of array A.
* testsuite/25_algorithms/stable_sort/mem_check.cc: Likewise.
Index: testsuite/25_algorithms/stable_partition/mem_check.cc
===================================================================
--- testsuite/25_algorithms/stable_partition/mem_check.cc(revision 186692)
+++ testsuite/25_algorithms/stable_partition/mem_check.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,4 +1,4 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2012 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,7 +31,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 typedef test_container&amp;lt;copy_tracker, random_access_iterator_wrapper&amp;gt; Container;
 
 const int A[] = {10, 20, 1, 11, 2, 21, 28, 29, 12, 35, 15, 27, 6, 16, 7, 
-                 25, 17, 8, 23, 18, 9, 19, 24, 30, 13, 4, 14, 22, 26};
+                 25, 17, 8, 23, 18, 9, 19, 24, 30, 13, 4, 14, 22, 26, 0};
 
 bool even(const copy_tracker&amp;amp; ct)
 { return ct.id() &amp;lt; 19; }
Index: testsuite/25_algorithms/stable_sort/mem_check.cc
===================================================================
--- testsuite/25_algorithms/stable_sort/mem_check.cc(revision 186692)
+++ testsuite/25_algorithms/stable_sort/mem_check.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,4 +1,4 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2012 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,7 +31,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 typedef test_container&amp;lt;copy_tracker, random_access_iterator_wrapper&amp;gt; Container;
 
 const int A[] = {10, 20, 1, 11, 2, 21, 28, 29, 12, 35, 15, 27, 6, 16, 7, 
-                 25, 17, 8, 23, 18, 9, 19, 24, 30, 13, 4, 14, 22, 26};
+                 25, 17, 8, 23, 18, 9, 19, 24, 30, 13, 4, 14, 22, 26, 0};
 
 void
 test_mem1(int throw_count)
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-04-23T11:18:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24236">
    <title>[v3] libstdc++/53067</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24236</link>
    <description>&lt;pre&gt;Hi,

tested x86_64-linux, committed mainline and branch.

Thanks,
Paolo.

///////////////////////
2012-04-22  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR libstdc++/53067
* include/bits/hashtable_policy.h: Change inheritances to public.
* testsuite/23_containers/unordered_map/requirements/53067.cc: New.
* testsuite/23_containers/unordered_set/requirements/53067.cc: Likewise.
Index: include/bits/hashtable_policy.h
===================================================================
--- include/bits/hashtable_policy.h(revision 186674)
+++ include/bits/hashtable_policy.h(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -882,7 +882,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
   /// Specialization using EBO.
   template&amp;lt;int _Nm, typename _Tp&amp;gt;
-    struct _Hashtable_ebo_helper&amp;lt;_Nm, _Tp, true&amp;gt; : private _Tp
+    struct _Hashtable_ebo_helper&amp;lt;_Nm, _Tp, true&amp;gt;
+    // See PR53067.
+    : public _Tp
     {
       _Hashtable_ebo_helper() = default;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -949,8 +951,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
   template&amp;lt;typename _Key, typename _Value, typename _ExtractKey,
    typename _H1, typename _H2, typename _Hash&amp;gt;
     struct _Hash_code_base&amp;lt;_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false&amp;gt;
-    : private _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;,
-      private _Hashtable_ebo_helper&amp;lt;1, _Hash&amp;gt;
+    // See PR53067.
+    : public  _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;,
+      public  _Hashtable_ebo_helper&amp;lt;1, _Hash&amp;gt;
     {
     private:
       typedef _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt; _EboExtractKey;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1025,9 +1028,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    typename _H1, typename _H2&amp;gt;
     struct _Hash_code_base&amp;lt;_Key, _Value, _ExtractKey, _H1, _H2,
    _Default_ranged_hash, false&amp;gt;
-    : private _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;,
-      private _Hashtable_ebo_helper&amp;lt;1, _H1&amp;gt;,
-      private _Hashtable_ebo_helper&amp;lt;2, _H2&amp;gt;
+    // See PR53067.
+    : public  _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;,
+      public  _Hashtable_ebo_helper&amp;lt;1, _H1&amp;gt;,
+      public  _Hashtable_ebo_helper&amp;lt;2, _H2&amp;gt;
     {
     private:
       typedef _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt; _EboExtractKey;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1108,9 +1112,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    typename _H1, typename _H2&amp;gt;
     struct _Hash_code_base&amp;lt;_Key, _Value, _ExtractKey, _H1, _H2,
    _Default_ranged_hash, true&amp;gt;
-    : private _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;,
-      private _Hashtable_ebo_helper&amp;lt;1, _H1&amp;gt;,
-      private _Hashtable_ebo_helper&amp;lt;2, _H2&amp;gt;
+    // See PR53067.
+    : public  _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;,
+      public  _Hashtable_ebo_helper&amp;lt;1, _H1&amp;gt;,
+      public  _Hashtable_ebo_helper&amp;lt;2, _H2&amp;gt;
     {
     private:
       typedef _Hashtable_ebo_helper&amp;lt;0, _ExtractKey&amp;gt;_EboExtractKey;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1229,7 +1234,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    typename _H1, typename _H2, typename _Hash&amp;gt;
     struct _Local_iterator_base&amp;lt;_Key, _Value, _ExtractKey,
 _H1, _H2, _Hash, true&amp;gt;
-      : private _H2
+    // See PR53067.
+    : public _H2
     {
       _Local_iterator_base() = default;
       _Local_iterator_base(_Hash_node&amp;lt;_Value, true&amp;gt;* __p,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1261,8 +1267,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    typename _H1, typename _H2, typename _Hash&amp;gt;
     struct _Local_iterator_base&amp;lt;_Key, _Value, _ExtractKey,
 _H1, _H2, _Hash, false&amp;gt;
-      : private _Hash_code_base&amp;lt;_Key, _Value, _ExtractKey,
-_H1, _H2, _Hash, false&amp;gt;
+    // See PR53067.
+    : public _Hash_code_base&amp;lt;_Key, _Value, _ExtractKey,
+     _H1, _H2, _Hash, false&amp;gt;
     {
       _Local_iterator_base() = default;
       _Local_iterator_base(_Hash_node&amp;lt;_Value, false&amp;gt;* __p,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1421,9 +1428,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
    typename _ExtractKey, typename _Equal,
    typename _H1, typename _H2, typename _Hash, typename _Traits&amp;gt;
   struct _Hashtable_base
+  // See PR53067.
   : public  _Hash_code_base&amp;lt;_Key, _Value, _ExtractKey, _H1, _H2, _Hash,
-    _Traits::__hash_cached::value&amp;gt;,
-    private _Hashtable_ebo_helper&amp;lt;0, _Equal&amp;gt;
+      _Traits::__hash_cached::value&amp;gt;,
+    public _Hashtable_ebo_helper&amp;lt;0, _Equal&amp;gt;
   {
   public:
     typedef _Key                                    key_type;
Index: testsuite/23_containers/unordered_map/requirements/53067.cc
===================================================================
--- testsuite/23_containers/unordered_map/requirements/53067.cc(revision 0)
+++ testsuite/23_containers/unordered_map/requirements/53067.cc(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+
+#include &amp;lt;unordered_map&amp;gt;
+#include &amp;lt;functional&amp;gt;
+
+void f()
+{
+  std::unordered_map&amp;lt;int, int&amp;gt; Foo;
+  ref(Foo);
+}
Index: testsuite/23_containers/unordered_set/requirements/53067.cc
===================================================================
--- testsuite/23_containers/unordered_set/requirements/53067.cc(revision 0)
+++ testsuite/23_containers/unordered_set/requirements/53067.cc(revision 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+// Copyright (C) 2012 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without Pred the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+
+#include &amp;lt;unordered_set&amp;gt;
+#include &amp;lt;functional&amp;gt;
+
+void f()
+{
+  std::unordered_set&amp;lt;int&amp;gt; Foo;
+  ref(Foo);
+}
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-04-22T17:39:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24234">
    <title>[v3] fix libstdc++/53027</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24234</link>
    <description>&lt;pre&gt;        * include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
        * testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
        rebind works.

Tested x86_64linux, committed to trunk and will commit to 4.7 soon.
commit 6141cdceb14025ef258b8809301558f5962bf7ab
Author: Jonathan Wakely &amp;lt;jwakely.gcc&amp;lt; at &amp;gt;gmail.com&amp;gt;
Date:   Fri Apr 20 09:13:44 2012 +0100

    * include/bits/ptr_traits.h (pointer_traits::rebind): Make public.
    * testsuite/20_util/pointer_traits/requirements/typedefs.cc: Check
    rebind works.

diff --git a/libstdc++-v3/include/bits/ptr_traits.h b/libstdc++-v3/include/bits/ptr_traits.h
index 7f120b1..bba9b49 100644
--- a/libstdc++-v3/include/bits/ptr_traits.h
+++ b/libstdc++-v3/include/bits/ptr_traits.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -140,14 +140,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; _GLIBCXX_HAS_NESTED_TYPE(difference_type)
       /// Type used to represent the difference between two pointers
       typedef typename __ptrtr_diff_type&amp;lt;_Ptr&amp;gt;::__type  difference_type;
 
-    private:
       template&amp;lt;typename _Up&amp;gt;
         using rebind = typename __ptrtr_rebind&amp;lt;_Ptr, _Up&amp;gt;::__type;
-
-      // allocator_traits needs to use __rebind
-      template&amp;lt;typename&amp;gt; friend struct allocator_traits;
-      template&amp;lt;typename&amp;gt; friend struct pointer_traits;
-      template&amp;lt;typename, typename&amp;gt; friend class __ptrtr_rebind_helper2;
     };
 
   /**
diff --git a/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc
index c682557..47b5212 100644
--- a/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/pointer_traits/requirements/typedefs.cc
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -32,6 +32,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void test01()
   typedef typename test_type::pointer           pointer;
   typedef typename test_type::element_type      element_type;
   typedef typename test_type::difference_type   difference_type;
+  typedef typename test_type::template rebind&amp;lt;char&amp;gt; rebind_type;
 }
 
 int main()
&lt;/pre&gt;</description>
    <dc:creator>Jonathan Wakely</dc:creator>
    <dc:date>2012-04-22T13:44:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24231">
    <title>[v3] libstdc++/53052</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24231</link>
    <description>&lt;pre&gt;Hi,

tested x86_64-linux, committed.

Thanks,
Paolo.

//////////////////////
2012-04-20  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;

PR libstdc++/53052
* include/std/type_traits (is_explicitly_convertible): Remove.
* testsuite/20_util/is_explicitly_convertible: Likewise.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Adjust dg-error line numbers.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
Index: include/std/type_traits
===================================================================
--- include/std/type_traits(revision 186615)
+++ include/std/type_traits(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1281,13 +1281,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
        __is_convertible_helper&amp;lt;_From, _To&amp;gt;::value&amp;gt;
     { };
 
-  /// is_explicitly_convertible
-  template&amp;lt;typename _From, typename _To&amp;gt;
-    struct is_explicitly_convertible
-    : public is_constructible&amp;lt;_To, _From&amp;gt;
-    { };
 
-
   // const-volatile modifications.
 
   /// remove_const
Index: testsuite/20_util/make_signed/requirements/typedefs_neg.cc
===================================================================
--- testsuite/20_util/make_signed/requirements/typedefs_neg.cc(revision 186615)
+++ testsuite/20_util/make_signed/requirements/typedefs_neg.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -49,5 +49,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 // { dg-error "required from here" "" { target *-*-* } 41 }
 // { dg-error "required from here" "" { target *-*-* } 43 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1581 }
-// { dg-error "declaration of" "" { target *-*-* } 1545 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1575 }
+// { dg-error "declaration of" "" { target *-*-* } 1539 }
Index: testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
===================================================================
--- testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc(revision 186615)
+++ testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -49,5 +49,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 // { dg-error "required from here" "" { target *-*-* } 41 }
 // { dg-error "required from here" "" { target *-*-* } 43 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1499 }
-// { dg-error "declaration of" "" { target *-*-* } 1463 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1493 }
+// { dg-error "declaration of" "" { target *-*-* } 1457 }
Index: testsuite/20_util/declval/requirements/1_neg.cc
===================================================================
--- testsuite/20_util/declval/requirements/1_neg.cc(revision 186615)
+++ testsuite/20_util/declval/requirements/1_neg.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,7 +19,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 // with this library; see the file COPYING3.  If not see
 // &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
 
-// { dg-error "static assertion failed" "" { target *-*-* } 1792 }
+// { dg-error "static assertion failed" "" { target *-*-* } 1786 }
 
 #include &amp;lt;utility&amp;gt;
 
Index: testsuite/20_util/is_explicitly_convertible/value.cc
===================================================================
--- testsuite/20_util/is_explicitly_convertible/value.cc(revision 186615)
+++ testsuite/20_util/is_explicitly_convertible/value.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,45 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-// { dg-options "-std=gnu++0x" }
-
-// Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
-
-#include &amp;lt;type_traits&amp;gt;
-#include &amp;lt;testsuite_hooks.h&amp;gt;
-#include &amp;lt;testsuite_tr1.h&amp;gt;
-
-void test01()
-{
-  bool test __attribute__((unused)) = true;
-  using std::is_explicitly_convertible;
-  using namespace __gnu_test;
-
-  // Positive tests.
-  VERIFY( (test_relationship&amp;lt;is_explicitly_convertible, double&amp;amp;,
-   ExplicitClass&amp;gt;(true)) );
-  VERIFY( (test_relationship&amp;lt;is_explicitly_convertible, int&amp;amp;,
-   ExplicitClass&amp;gt;(true)) );
-
-  // Negative tests.
-  VERIFY( (test_relationship&amp;lt;is_explicitly_convertible, void*,
-   ExplicitClass&amp;gt;(false)) );
-}
-
-int main()
-{
-  test01();
-  return 0;
-}
Index: testsuite/20_util/is_explicitly_convertible/requirements/typedefs.cc
===================================================================
--- testsuite/20_util/is_explicitly_convertible/requirements/typedefs.cc(revision 186615)
+++ testsuite/20_util/is_explicitly_convertible/requirements/typedefs.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,36 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
-
-// 2009-12-30  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;
-//
-// Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
-
-// 
-// NB: This file is for testing type_traits with NO OTHER INCLUDES.
-
-#include &amp;lt;type_traits&amp;gt;
-
-void test01()
-{
-  // Check for required typedefs
-  typedef std::is_explicitly_convertible&amp;lt;int, int&amp;gt;   test_type;
-  typedef test_type::value_type                      value_type;
-  typedef test_type::type                            type;
-  typedef test_type::type::value_type                type_value_type;
-  typedef test_type::type::type                      type_type;
-}
Index: testsuite/20_util/is_explicitly_convertible/requirements/explicit_instantiation.cc
===================================================================
--- testsuite/20_util/is_explicitly_convertible/requirements/explicit_instantiation.cc(revision 186615)
+++ testsuite/20_util/is_explicitly_convertible/requirements/explicit_instantiation.cc(working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,31 +0,0 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
-
-// 2009-12-30  Paolo Carlini  &amp;lt;paolo.carlini&amp;lt; at &amp;gt;oracle.com&amp;gt;
-
-// Copyright (C) 2009 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 3, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING3.  If not see
-// &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
-
-// NB: This file is for testing type_traits with NO OTHER INCLUDES.
-
-#include &amp;lt;type_traits&amp;gt;
-
-namespace std
-{
-  typedef short test_type;
-  template struct is_explicitly_convertible&amp;lt;test_type, test_type&amp;gt;;
-}
&lt;/pre&gt;</description>
    <dc:creator>Paolo Carlini</dc:creator>
    <dc:date>2012-04-20T09:41:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24224">
    <title>[PATCH] fix libstdc++/52604 : __freelist::~__freelist re-initializes _M_thread_freelist</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24224</link>
    <description>&lt;pre&gt;   All,

The attached patch re-initializes _M_thread_freelist in 
__freelist::~__freelist just after calling
   ::operator delete(static_cast&amp;lt;void*&amp;gt;(_M_thread_freelist_array));

It avoids valgrind errors in __pool&amp;lt;true&amp;gt;::_M_get_thread_id() later invoked.

Testcases :
   ext/mt_allocator/deallocate_global_thread-1.cc
   ext/mt_allocator/deallocate_global_thread-3.cc

Tested on x86_64-linux (make check, make check-performance).

Laurent

PS : Already approved by Paolo Carlini under the 52604 discussions.
Index: src/c++98/mt_allocator.cc
===================================================================
--- src/c++98/mt_allocator.cc    (revision 186374)
+++ src/c++98/mt_allocator.cc    (working copy)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,6 +48,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     {
       __gthread_key_delete(_M_key);
       ::operator delete(static_cast&amp;lt;void*&amp;gt;(_M_thread_freelist_array));
+      _M_thread_freelist = 0;
     }
     }
   };
&lt;/pre&gt;</description>
    <dc:creator>Laurent Alfonsi</dc:creator>
    <dc:date>2012-04-19T08:37:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24219">
    <title>Strange behavior of libstdc++ regression test</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24219</link>
    <description>&lt;pre&gt;Hi,

I built a cross compiler for arm-none-eabi and ran regression test on QEMU
with command: "make -k check
RUNTESTFLAGS="--target_board=arm-none-eabi-qemu/-mthumb/-mcpu=cortex-m3"".

And then I end up with following strange errors on libstdc++:

make[6]: Entering directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/armv7-r/
thumb/fpu/libstdc++-v3/python'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/armv7-r/
thumb/fpu/libstdc++-v3/python'
make[6]: Entering directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/armv7-r/
thumb/fpu/libstdc++-v3'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc"
"CC_FOR_TARGET=/home/build/gcc-4-7-daily-test/build-linux/gcc-final/./gcc/xg
cc
-B/home/build/gcc-4-7-daily-test/build-linux/gcc-final/./gcc/"
"CFLAGS=-g -O2  -mthumb -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16"
"CXXFLAGS=-g -O2  -mthumb -march=armv7-r -mfloat-abi=hard
-mfpu=vfpv3-d16" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2"
"INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644"
"INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install
-c" "LDFLAGS=-mthumb -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16"
"LIBCFLAGS=-g -O2  -mthumb -march=armv7-r -mfloat-abi=hard
-mfpu=vfpv3-d16" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make"
"MAKEINFO=makeinfo --split-size=5000000      " "PICFLAG="
"PICFLAG_FOR_TARGET=" "SHELL=/bin/sh"
"RUNTESTFLAGS=--target_board=arm-none-eabi-qemu/-mthumb/-mcpu=cortex-m3"
"exec_prefix=/home/build/gcc-4-7-daily-test/install-linux"
"infodir=/home/build/gcc-4-7-daily-test/install-linux/share/info"
"libdir=/home/build/gcc-4-7-daily-test/install-linux/lib"
"includedir=/home/build/gcc-4-7-daily-test/install-linux/include"
"prefix=/home/build/gcc-4-7-daily-test/install-linux"
"tooldir=/home/build/gcc-4-7-daily-test/install-linux/arm-none-eabi"
"gxx_include_dir=/home/build/gcc-4-7-daily-test/install-linux/arm-none-eabi/
include/c++/4.7.1"
"AR=/home/build/gcc-4-7-daily-test/install-linux/arm-none-eabi/bin/ar"
"AS=/home/build/gcc-4-7-daily-test/build-linux/gcc-final/./gcc/as"
"LD=/home/build/gcc-4-7-daily-test/build-linux/gcc-final/./gcc/collect-ld"
"RANLIB=/home/build/gcc-4-7-daily-test/install-linux/arm-none-eabi/bin/ranli
b"
"NM=/home/build/gcc-4-7-daily-test/build-linux/gcc-final/./gcc/nm"
"NM_FOR_BUILD="
"NM_FOR_TARGET=/home/build/gcc-4-7-daily-test/install-linux/arm-none-eabi/bi
n/nm"
"DESTDIR=" "WERROR=" DO=all multi-do # make
make[6]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/armv7-r/
thumb/fpu/libstdc++-v3'
make[5]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/armv7-r/
thumb/fpu/libstdc++-v3'
make[4]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/armv7-r/
thumb/fpu/libstdc++-v3'
make[3]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/libstdc+
+-v3'
make[2]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/libstdc+
+-v3'
make[1]: *** [check-recursive] Error 1
make[1]: Target `check' not remade because of errors.
make[1]: Leaving directory
`/home/build/gcc-4-7-daily-test/build-linux/gcc-final/arm-none-eabi/libstdc+
+-v3'
make: *** [check-target-libstdc++-v3] Error 2
make: Target `check-target' not remade because of errors.

A complete log file is attached. If the make target is check-gcc, everything
is fine. The Multilib is enabled and configured for different ARM targets. I
did some investigation and can't find any clue, could someone please help
me? Thanks.

BR,
Terry&lt;/pre&gt;</description>
    <dc:creator>Terry Guo</dc:creator>
    <dc:date>2012-04-19T07:03:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24210">
    <title>[v3, testsuite] Fix merging default libstdc++.log</title>
    <link>http://comments.gmane.org/gmane.comp.gcc.libstdc++.devel/24210</link>
    <description>&lt;pre&gt;I've long noticed that libstdc++.log (unlike libstdc++.sum) doesn't
contain log entries for tests run from abi.exp, but hadn't looked
closer, getting used to check libstdc++.log.sep instead which contained
everything I expected.

This weekend, I've observed the same for the prettyprinters.exp failures
reported in PR libstdc++/53006 and decided to investigate.

It turns out that abi_check is the culprit: it emits its own summary in
a style similar to what DejaGnu does:

=== libstdc++-v3 check-abi Summary ===

# of added symbols: 0
# of missing symbols: 0
# of undesignated symbols: 0
# of incompatible symbols: 0

using: baseline_symbols.txt

The header format is similar to what runtest emits, but the detail lines
below are completely different.

This is enought to seriously confuse contrib/dg-extract-results.sh -L
badly enough to assume that this header line ends one variant, which
otherwise only happens when doing multilib testing with intermediate
summaries like

=== libstdc++ Summary for unix ===

# of expected passes50

=== libstdc++ Summary for unix/-m64 ===

# of expected passes49
# of unexpected failures1

My (admittedly equally hacky solution) was to change the check-abi
header format enough to avoid this confusion, and suddently the expected
abi.exp and prettyprinters.exp log entries show up in the merged
libstdc++.log as expected.

Bootstrapped on i386-pc-solaris2.11, ok for mainline?

Thanks.
Rainer


2012-04-15  Rainer Orth  &amp;lt;ro&amp;lt; at &amp;gt;CeBiTec.Uni-Bielefeld.DE&amp;gt;

* testsuite/util/testsuite_abi.cc (compare_symbols): Change
summary header to avoid confision with DejaGnu header.



&lt;/pre&gt;</description>
    <dc:creator>Rainer Orth</dc:creator>
    <dc:date>2012-04-16T15:03:25</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.gcc.libstdc++.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gcc.libstdc++.devel</link>
  </textinput>
</rdf:RDF>

