public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45328]  New: bug w/ typedefs and std::initializer_list<T>
@ 2010-08-18 22:34 admin at thefireflyproject dot us
  2010-08-18 22:54 ` [Bug c++/45328] " redi at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: admin at thefireflyproject dot us @ 2010-08-18 22:34 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

Given this code,

#include <initializer_list>

typedef std::initializer_list<int> init_list;

struct A {
  A (init_list list) { }
};

struct B {
  B (std::initializer_list<int> list) { }
};

int main (void) {
  A a { 0, 1, 1, 2}; // compiler error 
  B b { 0, 1, 1, 2};
}

I get a compiler error when trying to brace initialize an instance of struct A.
The specific error:

initializer_bug.cpp: In function ‘int main()’:
initializer_bug.cpp:14:19: error: no matching function for call to
‘A::A(<brace-enclosed initializer list>)’
initializer_bug.cpp:6:3: note: candidates are: A::A(init_list)
initializer_bug.cpp:5:10: note:                 A::A(const A&)

Compiled example code with g++ --std=c++0x initializer_bug.cpp -o
initializer_bug.

Using gcc version 4.5.1 20100617 (prerelease) (Debian 4.5.0-6)


-- 
           Summary: bug w/ typedefs and std::initializer_list<T>
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: admin at thefireflyproject dot us
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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


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

* [Bug c++/45328] bug w/ typedefs and std::initializer_list<T>
  2010-08-18 22:34 [Bug c++/45328] New: bug w/ typedefs and std::initializer_list<T> admin at thefireflyproject dot us
@ 2010-08-18 22:54 ` redi at gcc dot gnu dot org
  2010-08-18 23:11 ` [Bug c++/45328] [C++0x] " paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-08-18 22:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from redi at gcc dot gnu dot org  2010-08-18 22:54 -------
possibly related to Bug 44703, although that's fixed in 4.5.1


-- 


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


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

* [Bug c++/45328] [C++0x] bug w/ typedefs and std::initializer_list<T>
  2010-08-18 22:34 [Bug c++/45328] New: bug w/ typedefs and std::initializer_list<T> admin at thefireflyproject dot us
  2010-08-18 22:54 ` [Bug c++/45328] " redi at gcc dot gnu dot org
@ 2010-08-18 23:11 ` paolo dot carlini at oracle dot com
  2010-08-18 23:19 ` paolo dot carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-08-18 23:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2010-08-18 23:11 -------
Let's CC Jason.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
            Summary|bug w/ typedefs and         |[C++0x] bug w/ typedefs and
                   |std::initializer_list<T>    |std::initializer_list<T>


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


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

* [Bug c++/45328] [C++0x] bug w/ typedefs and std::initializer_list<T>
  2010-08-18 22:34 [Bug c++/45328] New: bug w/ typedefs and std::initializer_list<T> admin at thefireflyproject dot us
  2010-08-18 22:54 ` [Bug c++/45328] " redi at gcc dot gnu dot org
  2010-08-18 23:11 ` [Bug c++/45328] [C++0x] " paolo dot carlini at oracle dot com
@ 2010-08-18 23:19 ` paolo dot carlini at oracle dot com
  2010-08-25 11:03 ` pinskia at gcc dot gnu dot org
  2010-08-25 11:04 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-08-18 23:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2010-08-18 23:19 -------
Actually, both mainline and the released 4.5.1 work, most likely a duplicate of
PR 44703 indeed.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jason at gcc dot gnu dot org|
             Status|UNCONFIRMED                 |RESOLVED
      Known to fail|                            |4.5.0
      Known to work|                            |4.6.0 4.5.1
         Resolution|                            |WORKSFORME


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


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

* [Bug c++/45328] [C++0x] bug w/ typedefs and std::initializer_list<T>
  2010-08-18 22:34 [Bug c++/45328] New: bug w/ typedefs and std::initializer_list<T> admin at thefireflyproject dot us
                   ` (2 preceding siblings ...)
  2010-08-18 23:19 ` paolo dot carlini at oracle dot com
@ 2010-08-25 11:03 ` pinskia at gcc dot gnu dot org
  2010-08-25 11:04 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-08-25 11:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2010-08-25 11:03 -------
Reopening to ...


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WORKSFORME                  |


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


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

* [Bug c++/45328] [C++0x] bug w/ typedefs and std::initializer_list<T>
  2010-08-18 22:34 [Bug c++/45328] New: bug w/ typedefs and std::initializer_list<T> admin at thefireflyproject dot us
                   ` (3 preceding siblings ...)
  2010-08-25 11:03 ` pinskia at gcc dot gnu dot org
@ 2010-08-25 11:04 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-08-25 11:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2010-08-25 11:03 -------
To mark as a dup of 44703.

*** This bug has been marked as a duplicate of 44703 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2010-08-25 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18 22:34 [Bug c++/45328] New: bug w/ typedefs and std::initializer_list<T> admin at thefireflyproject dot us
2010-08-18 22:54 ` [Bug c++/45328] " redi at gcc dot gnu dot org
2010-08-18 23:11 ` [Bug c++/45328] [C++0x] " paolo dot carlini at oracle dot com
2010-08-18 23:19 ` paolo dot carlini at oracle dot com
2010-08-25 11:03 ` pinskia at gcc dot gnu dot org
2010-08-25 11:04 ` pinskia at gcc dot gnu dot org

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).