Possible bug in the string constructor suggestion

From: Antonio Bulgheroni <antonio.bulgheroni_at_gmail.com>
Date: Wed, 9 Jul 2008 17:45:32 +0200


Dear ROOTers,

   I think I've hit a bug in the STL string constructor suggestion. If from the root command line I type

       string myString(

and then type tab, I got the following possible completions :

string string()
string string(const string& str)
string string(const string& str, size_t pos, size_t n)
string string(const char* s, size_t n)
string string(const char* s)
string string(char c, size_t rep)

In particular I'm interested in the last one, but this is not compliant with any C++ standard ctors. The correct constructor should be string(size_t rep, char c) and indeed using the proposed constructor results in a misbehavior as shown in the attached example.

Using ROOT v5.20.00 on a linux box

Thanks for helping,

Antonio



Antonio Bulgheroni, PhD
http://unico-lab.blogspot.com

"There are 10 kinds of people. Those that understand binary and those that don't."

Received on Wed Jul 09 2008 - 17:45:44 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 10 2008 - 17:50:04 CEST