Description:
Technical discussion of the C++ language. (Moderated)
|
|
|
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-
|
|
Forward reference to a class in a namespace?
|
| |
I've got a header, foo:h, which has: namespace Foo { class Base { [...] }; ...In bar.c, I have a class method declared: void doSomething(Foo::Base* foo); I can #include foo.h and everything works fine, but I'd like to reduce coupling by only including the headers I really need. All I should... more »
|
|
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 requirements... more »
|
|
Available C++ Libraries FAQ
|
| |
Available C++ Libraries FAQ URL: [link] This is a searchable list of libraries and utilities (both free and commercial) available to C++ programmers. If you know of a library which is not in the list, why not fill in the form at [link]... more »
|
|
macro dispatching(overloading)
|
| |
Hi I want to dispatch a macro call according to the argument count. consider I have these macros: ...This won't compile because macro overloading is not allowed. I must use the followig code: ...when I use them, I must manually select which macro to use according to the arguments. e.g. DO3(2,3,4) this is a bit redundent because the... more »
|
|
Constness for user-defined by-reference types
|
| |
What is a good way to express constness for user-defined by-reference types? Plain const does not work because you can easily make a non-const object, void foo (const T& t) { T t1(t); // non-const path to t via t1 } Traditionally, you need two separate types (like iterator and const_iterator). I wonder if there is something in C++ which would... more »
|
|
Final Call for Participation
|
| |
Please distribute! ------------------------------ -- 4th Annual Boost Conference 2010 ------------------------------ -- Aspen CO, USA, May 10-14, 2010, [link] Final Call for Participation ------------------------------ -- Important dates: Proposal submissions Extended to January 3, 2010... more »
|
|
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 pretty stable from run to run.... more »
|
|
Arrays optimization
|
| |
Given that v[i] is equal to *(v + i), and given a function that uses v1 [n] and v2[m], is there a way to tell the compiler to optimize the code providing the strong guarantee that the two arrays are totally different (so can perform parallelization or vectorization)? Is there any special identifier in the C++ language that a priori say... more »
|
|
|