hanmyohtwe / waitzar

Automatically exported from code.google.com/p/waitzar
Other
0 stars 0 forks source link

C++0x features waiting on GCC 4.6 or later #187

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Some of the new C++0x features haven't been implemented yet. Most of these are 
slated for GCC 4.6 (due any minute now...). Others clearly didn't make the 
feature freeze. Here we will list features that Wait Zar is waiting on, and 
what they might be used for.

nullptr (4.6)
-------
We should replace most occurrences of NULL with nullptr. I'm not sure if 
nullptr will cast back to 0 when treated as an int (I think it won't, based on 
the standard). If it doesn't, that might still be fine for the Win32 calls, 
since it'll cast to a bool. (Again, "maybe"). Shouldn't be too much work, and 
is better for maintainability.

Constructor Delegation (4.7+)
----------------------
A lot of our Pulp Core constructors should really chain to their base class 
constructors, since the Pulp Core library was originally written in Java.

Range-based for loops (4.6)
---------------------
The "auto" pointer really should be used with this new syntax. Consider:
for (auto &x : my_vector) {}

Original issue reported on code.google.com by seth.h...@gmail.com on 15 Jan 2011 at 6:31

GoogleCodeExporter commented 8 years ago
Template aliases (4.7+)
----------------
There will be a "using" syntax for, essentially, typedef-ing templates. We 
don't really use that so much, but it will _also_ apply to regular typedef 
usage. So, we might use:
using MyType = void(*)double;
...to clear up our Win32 function pointer syntax. 

Original comment by seth.h...@gmail.com on 15 Jan 2011 at 6:40