public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/44969]  New: [C++0x] <type_traits> std::is_constructible broken for fundamental types.
@ 2010-07-17  0:01 piotr dot rak at gmail dot com
  2010-07-17  0:03 ` [Bug libstdc++/44969] " piotr dot rak at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: piotr dot rak at gmail dot com @ 2010-07-17  0:01 UTC (permalink / raw)
  To: gcc-bugs

cat is_constructible_bug.cc && g++-trunk -v -c -std=c++0x
is_constructible_bug.cc 
#include <type_traits>

class allocator_arg_t {};

class A {};

// From n3092: [allocator.uses.construction] 20.9.2.2 p1.2
//  (2nd part of condition, in FCD use case first part never true)
template <typename X, typename Alloc, typename... Args>
struct alloc_arg_1st : 
    std::is_constructible<X, ::allocator_arg_t, Alloc, Args...>
{
};

bool foo()
{
    struct B {};
    bool val = alloc_arg_1st<B, A>::value;// ok
    return val || alloc_arg_1st<int, A>::value; // bang
}
Using built-in specs.
COLLECT_GCC=/home/prak/Dev/gcc-install/bin/g++-trunk
COLLECT_LTO_WRAPPER=/home/prak/Dev/gcc-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc.git/configure --enable-languages=c,c++
--program-suffix=-trunk --prefix=/home/prak/Dev/gcc-install --disable-bootstrap
Thread model: posix
gcc version 4.6.0 20100716 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-c' '-std=c++0x' '-shared-libgcc' '-mtune=generic'
'-march=pentiumpro'
 /home/prak/Dev/gcc-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/cc1plus -quiet
-v -D_GNU_SOURCE is_constructible_bug.cc -quiet -dumpbase
is_constructible_bug.cc -mtune=generic -march=pentiumpro -auxbase
is_constructible_bug -std=c++0x -version -o /tmp/ccocsKE0.s
GNU C++ (GCC) version 4.6.0 20100716 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.4, GMP version 4.3.2, MPFR version 3.0.0,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0

/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/i686-pc-linux-gnu

/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/backward
 /home/prak/Dev/gcc-install/include
 /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/include
 /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.6.0 20100716 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.4, GMP version 4.3.2, MPFR version 3.0.0,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 6d1c47967936e3e68fa845533411d5d9
In file included from is_constructible_bug.cc:1:0:
/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:
In instantiation of &#8216;const bool std::__is_constructible_helper<int,
allocator_arg_t, A>::__value&#8217;:
/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:231:12:
  instantiated from &#8216;std::is_constructible<int, allocator_arg_t,
A>&#8217;
is_constructible_bug.cc:10:8:   instantiated from &#8216;alloc_arg_1st<int,
A>&#8217;
is_constructible_bug.cc:19:40:   instantiated from here
/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:209:71:
error: expression list treated as compound expression in functional cast
[-fpermissive]


-- 
           Summary: [C++0x] <type_traits> std::is_constructible broken for
                    fundamental types.
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: piotr dot rak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44969


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-07-20  9:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-17  0:01 [Bug libstdc++/44969] New: [C++0x] <type_traits> std::is_constructible broken for fundamental types piotr dot rak at gmail dot com
2010-07-17  0:03 ` [Bug libstdc++/44969] " piotr dot rak at gmail dot com
2010-07-17  0:56 ` paolo dot carlini at oracle dot com
2010-07-17 19:05 ` [Bug c++/44969] " paolo dot carlini at oracle dot com
2010-07-17 19:14 ` paolo dot carlini at oracle dot com
2010-07-17 19:14 ` paolo dot carlini at oracle dot com
2010-07-17 20:54 ` jason at redhat dot com
2010-07-17 21:10 ` paolo dot carlini at oracle dot com
2010-07-18 22:33 ` jason at redhat dot com
2010-07-19  9:38 ` paolo dot carlini at oracle dot com
2010-07-19 10:28 ` paolo at gcc dot gnu dot org
2010-07-19 14:51 ` jason at gcc dot gnu dot org
2010-07-20  9:29 ` paolo dot carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).