ambiguous std::fill with character array

Maik Beckmann beckmann.maik@googlemail.com
Thu Mar 27 21:11:00 GMT 2008


Hello

Consider this snipped
<code>
#include <string>
#include <vector>
#include <algorithm>

int main() {
  std::vector<std::string> foo(20);  
  std::fill(foo.begin(), foo.end(), "bar");
}
</code>

g++-4.2.3 compiles it, but 4.3.0 gives the attached error message.  

The solution is to use
  std::fill(array.begin(), array.end(), std::string("interpolateboundary"));

My question: Is it a bug or by intention?

Thanks,
 -- Maik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log
Type: text/x-diff
Size: 1740 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20080327/f3fe3db1/attachment.bin>


More information about the Gcc-help mailing list