Andre Poenitz <[EMAIL PROTECTED]> writes:

| On Fri, Oct 25, 2002 at 04:09:01PM +0200, Lars Gullik Bjønnes wrote:
>> | Lars> and instead of the STRCONV(), you would need a string(). So what
>> | Lars> did you really gain? (except hiding the ugly conversion)
>> >
>> | Why would we need this? I have never seen that we need
>> |   str = string("foo");
>> | instead of
>> |   str = "foo";
>> >
>> | So what's the problem here?
>> 
>> If we agree that implicit conversions is bad, all conversions need to
>> be tagged with something. (and I am not adding more non-standard
>> c-tors to lyxstring either.)
>
| std::string has a constructor
>
|  basic_string(const charT* s, const Allocator& a = Allocator());
>
| so there is no need to add a "non-standard c-tor". I find the extra
| verbosity in  str = string("foo");  plain ugly.

  the issue is:

  ostringstream ost;
  lyxstring lstr = ost.str();
          ^^^^^       ^^^^
        lyxstring    basic_string

  So to make this compile you either:
     - use c_str()
     - or anoother markup  (STRCONV f.ex to make it ugly and tell
       _why_ it is there.
     - use implicit conversions. but I do not like that because then
       it is never shown why the conversion is there and that it is ugly

-- 
        Lgb

Reply via email to