Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Portable use of widen()

Reply
Thread Tools

Portable use of widen()

 
 
kristian
Guest
Posts: n/a
 
      01-02-2011
Is the following function portable according to C++03 given any
compliant stream locale and a compliant compiler:

void parenthesize(std::wostream &out, int i)
{
out << out.widen('(') << i << out.widen(')');
}

What I'm mostly concerned about is the use of widen() and the encoding
of the character literals passed as argument - given the fact that the
used characters are part of the basic source character set.
 
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
my laptop sata hdd crahed,can i use seagate portable hdd as laptopsata hdd through some convertors?? ashjas Computer Support 2 03-29-2008 07:24 PM
Portable Python - free portable development environment ! perica.zivkovic@gmail.com Python 7 01-13-2007 11:19 AM
portable (VHDL) vs. non-portable (altera LPM) approaches to signed computations Eli Bendersky VHDL 1 03-01-2006 02:43 PM
Portable use of fread/fwrite with structs mazsx C Programming 2 11-11-2005 03:55 PM
Portable way to use 64-bit values Sorav Bansal C Programming 7 07-15-2005 07:41 PM



Advertisments