[Bug c++/71590] G++ template function initialize with wrong type

2016-06-20 Thread markowitz73 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71590 --- Comment #4 from gliu --- (In reply to Martin Sebor from comment #3) > There is a (subtle) difference between the initialization in "std::string s > = a;" and the assignment in "std::string s; s = a;" When valid, the > initialization invokes

[Bug c++/71590] G++ template function initialize with wrong type

2016-06-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71590 --- Comment #3 from Martin Sebor --- There is a (subtle) difference between the initialization in "std::string s = a;" and the assignment in "std::string s; s = a;" When valid, the initialization invokes a constructor (possibly two), while the

[Bug c++/71590] G++ template function initialize with wrong type

2016-06-20 Thread markowitz73 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71590 --- Comment #2 from gliu --- (In reply to Martin Sebor from comment #1) > It is true that there is no std::string::operator=(int) but the assignment > in 'x = a' resolves to std::string::operator(char). The program is valid. Thanks for

[Bug c++/71590] G++ template function initialize with wrong type

2016-06-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71590 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|