reasoning of ::std::cout (ostream) conversion w.r.t. plain, signed and unsigned chars... On Jan 8, 3:39 pm, leonleon77 <leonleo...(a)gmail.com> wrote: Hello, given that C++ standard has 3 distinct types for a char: plain, signed and unsigned; and given that such a distinction is perfectly achievable in function overloading and/or template specialization -- what are the reasons for represent... 12 Jan 2010 19:39
Use of facet codecvt for indenting output text Hello, I'm looking for implementing a way to indent some data fed to an std::ostream. I found this link: http://stackoverflow.com/questions/1391746/how-to-easily-indent-output-to-ofstream that proposes to use a facet; I think it is a good idea (and having the opportunity to work with locales for the first ti... 20 Jan 2010 09:29
Generic compare function Why C++ does not contain a generic compare function? Such function would return a negative value if left < right, zero if left == right and a positive value if left > right. It could be either overloaded for user types or like swap use some template magic. Such function would be useful in cases when obj... 21 Jan 2010 21:25
We Wait For Thee: char16_t, char32_t. { The question concerns the two C++0x types char16_t and char32_t. -mod } Hi All, Any idea when these two types will be commonly supported across major compilers? 2010? 2011? Later? My primary development environment is VS2008 on Windows. TIA, -Le Chaud Lapin- -- [ See http://www.gotw.ca/r... 27 Jan 2010 00:29
How to create a shallow copy without calling a constructor? Hello, I need to create a cache of a transactional object without using the new operator nor the copy constructor of the class. This cache needs only to copy the raw memory of the copied instance, is for that I have called it shallow_clone The following will create a deep copy and don't respect my requirement... 6 Jan 2010 19:54
Iterating over vectors - speed difference Hi I am comparing the runtime of iterating through a vector using 3 different approaches - 1) Indexing -> i = 0; i < vec.size(); 2) Iterator -> i = vec.begin(), i != vec.end() 3) Summing using Accumulate Here are the runtimes on my computer. I am compiling using VC++ 2008, Release mode build. Runtimes are pr... 6 Jan 2010 08:30
Tricky declarators It is well established that "int (*) (int)" is a pointer to a function that takes an integer and returns an int. But what about spelling the type of a function that takes and integer and returns an int. By first though was perhaps "int ()(int)", but Comeau C++ interpets that as a function that takes an int and re... 26 Dec 2009 14:22
U++ 1824 released Website: http://www.ultimatepp.org Download: http://code.google.com/p/upp-mirror/downloads/list U++ is BSD licensed C++ cross-platform rapid application development suite focused on programmers productivity without sacrificing runtime performance. What is new in version 1824: Core: * XmlRpc package adds su... 22 Dec 2009 00:36
Template: Specialization Help Hi, I have a legacy code: template<Uint64 BuffLenT> Struct UNum : BasicTypes<BuffLenT> { typedef Uint64 NumberT; inline NumberT operator() () const { NumberT ret = 0; sscanf (this->buffer_, "%ul", &ret); return ret; } }; Uint64 is a typedef and comes from "internal" headers. I... 22 Dec 2009 00:36
How to convert C to C++? I want to convert C programs to C++ programs. I found this tool http://www.scriptol.com/scripts/ctocpp.php But I'm wondering if this is the best tool to convert C programs to C+ + programs. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time po... 6 Jan 2010 08:30 |