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

--- Comment #3 from Bastien ROUCARIES <roucaries.bastien+bugs at gmail dot com> 
2012-05-21 21:19:35 UTC ---
bastien@bastien-debian:/tmp$ cat test.c
#include <array>

void function(std::array<unsigned int,3> a)
{
}

int main()
{
    // ok
std::array<unsigned int,3> vec {0, 0, 0};

// error: could not convert '{"hello", "world", "test"}' to
//'std::vector...'
function({0,0,0});
}
bastien@bastien-debian:/tmp$ g++-4.7 -std=c++11 test.c 
test.c: In function ‘int main()’:
test.c:14:17: error: could not convert ‘{0, 0, 0}’ from ‘<brace-enclosed
initializer list>’ to ‘std::array<unsigned int, 3ul>’
bastien@bastien-debian:/tmp$ g++-4.7 --version
g++-4.7 (Debian 4.7.0-7) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


So it does not work under debian testing of the day (upgraded today)

Reply via email to