Re: string v.s. basic_string



typedef tstring std::basic_string<TCHAR>;
Of ocourse:

typedef std::basic_string<TCHAR> tstring;
or better:
typedef std::basic_string<TCHAR> _tstring;

You shouldn't start anything with an underscore in light of 17.4.3.1.2 of
the standard (and MSFT's own guidelines regarding identifier names at "file
scope"). It's also jarring on the eyes IMHO. The use of "tstring" also isn't
the issue it once was. Unicode is now pervasive enough that most can just
rely on "wchar_t" instead. I still find it hard to do that personally
however though the "_T()" macro and cousins has always been an eyesore.


.



Relevant Pages

  • Re: Is "scope" different from "visibility" ?
    ... The standard does not specifically define "visibility" but it ... Within the inner scope, the identifier designates the entity ... context disambiguates uses that refer to different entities. ...
    (comp.lang.c)
  • Re: string v.s. basic_string
    ... the standard (and MSFT's own guidelines regarding identifier names at "file scope"). ... Unicode is now pervasive enough that most can just rely on "wchar_t" instead. ...
    (microsoft.public.vc.language)
  • Re: Opinions on "new SomeObject" vs. "SomeObject->new()"
    ... how about some general programming guidelines ... Variables with a broad scope ... Whitespace increases readability. ... an opening indexing bracket or brace, ...
    (comp.lang.perl.misc)
  • Re: types, variable names and fields
    ... No, assuming the same scope, no two typedefs, objects, or functions ... determine what declaration an identifier refers to. ... For structure/union tags and members, ... declarator or type specifier). ...
    (comp.lang.c)
  • Re: Array definition guarantees
    ... linkage tells you where, ... identifier that is spelled sufficiently similarly. ... I think it is closer to say that scope tells you where the name ... The second glitch in this is the "extern" keyword. ...
    (comp.lang.c)