> From: Jonathan Wakely <jwakely....@gmail.com>
> Date: Fri, 19 Oct 2012 18:16:51 +0200

> This adds support for piecewise construction of std::pair by
> scoped_allocator_adaptor.  The only thing missing from
> scoped_allocator_adaptor now is that my definition of OUTERMOST isn't
> recursive so doesn't work for nested scoped_allocator_adaptors.
> That's a suitably obscure use case that I'm not going to rush to fix
> it today.
> 
>         * include/std/scoped_allocator (__outermost_alloc_traits): Define.
>         (scoped_allocator_adaptor::destroy): Use it.
>         (scoped_allocator_adaptor::construct): Likewise. Overload for
>         piecewise construction of std::pair objects.
>         * testsuite/20_util/scoped_allocator/2.cc: New.
> 
> Tested x86_64-linux, committed to trunk.

Looks like _U is one of those identifiers that should be
avoided:  Grep yields:
src/newlib/libc/include/ctype.h:#define _U      01

And also:
#define _L      02
#define _N      04
#define _S      010
#define _P      020
#define _C      040
#define _X      0100
#define _B      0200

Trunk is broken for cris-elf (a newlib target) as follows,
coinciding with the above commit (one in 192612:192621).

/tmp/hpautotest-gcc0/cris-elf/gccobj/./gcc/xgcc -shared-libgcc 
-B/tmp/hpautotest-gcc0/cris-elf/gccobj/./gcc -nostdinc++ 
-L/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/src 
-L/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/src/.libs 
-nostdinc -B/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/newlib/ -isystem 
/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/newlib/targ-include -isystem 
/tmp/hpautotest-gcc0/gcc/newlib/libc/include 
-B/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libgloss/cris 
-L/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libgloss/libnosys 
-L/tmp/hpautotest-gcc0/gcc/libgloss/cris 
-B/tmp/hpautotest-gcc0/cris-elf/pre/cris-elf/bin/ 
-B/tmp/hpautotest-gcc0/cris-elf/pre/cris-elf/lib/ -isystem 
/tmp/hpautotest-gcc0/cris-elf/pre/cris-elf/include -isystem 
/tmp/hpautotest-gcc0/cris-elf/pre/cris-elf/sys-include    -x c++-header 
-nostdinc++ -g -O2 
-I/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cris-elf 
-I/tmp/hpautotest-gcc0/cris-elf/
 gccobj/cris-elf/libstdc++-v3/include 
-I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x 
/tmp/hpautotest-gcc0/gcc/libstdc++-v3/include/precompiled/stdc++.h \
        -o cris-elf/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from 
/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cctype:44:0,
                 from 
/tmp/hpautotest-gcc0/gcc/libstdc++-v3/include/precompiled/stdc++.h:36:
/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/scoped_allocator:368:53:
 error: expected nested-name-specifier before numeric constant
       template<typename _T1, typename _T2, typename _U, typename _V>
                                                     ^
/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/scoped_allocator:368:53:
 error: expected '>' before numeric constant
/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/scoped_allocator:370:33:
 error: expected identifier before numeric constant
  construct(pair<_T1, _T2>* __p, _U&& __u, _V&& __v)

                                 ^
(many similar error lines)

What's the preferred replacement?

brgds, H-P

Reply via email to