Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > compare string and "" string literal

Reply
Thread Tools

compare string and "" string literal

 
 
Roland Pibinger
Guest
Posts: n/a
 
      01-24-2007
On Wed, 24 Jan 2007 18:44:26 +0100, "Bo Persson" <(E-Mail Removed)> wrote:
>Roland Pibinger wrote:
>> On Wed, 24 Jan 2007 11:14:46 +0100, Michael DOUBEZ wrote:
>>> But then, what about section 21.3.8.2:
>>> template<class charT, class traits, class Allocator>
>>> bool operator==(const basic_string<charT,traits,Allocator>& lhs,
>>> const charT* rhs);
>>> 3 Returns:lhs == basic_string<charT,traits,Allocator>(rhs).

>>
>> I'd call that a contradiction in terms.

>
>Sort of, but not really.
>
>The "Returns:" element of the description prescribes the value returned by
>the function/operator, not how the value has to be computed.


Seems to be a plausible interpretation since the C++ Standard (AFAIK)
never prescribes a certain library implementation.

Best regards,
Roland Pibinger
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What's wrong with rpc-literal? Why use doc-literal? Anonieko Ramos ASP .Net Web Services 0 09-27-2004 09:06 AM
String literal and const al C Programming 7 12-20-2003 05:12 AM
String, String literal ? Could anyone explain to me ? herrcho C Programming 7 09-26-2003 04:54 PM
string literal as const string& parameter selder21@hotmail.com C++ 5 09-22-2003 11:50 AM
String literal and String Object Prakash Prabhu Java 3 08-27-2003 09:18 PM



Advertisments