C++0x Support in TnFOX

Note:
v0.88 could not get move constructors working properly in GCC v4.3 and so this particular feature has been disabled for now.
For a very long time now, TnFOX has contained support for one particular C++0x feature (move constructors) but the code had always been ifdef-ed out. As of v0.88 of TnFOX, GCC v4.3 finally has some very limited support for C++0x features and thus finally we can enable support. This is done by setting the enableCPP0xFeatures variable in config.py to True.

Changing this is a profound setting - it enables many new coding paradigms. Almost all existing code is forward compatible, but some is not. In particular, code which uses one of the new keywords as a variable name will cease to compile and additionally some constructs will need reworking to function correctly.

However, the benefits are many and huge. TnFOX has implemented move semantics for quite a few classes where it made sense since its inception. MSVC made this ok-ish through allowing non-const constructors which had to be hacked around in GCC (always praying that the optimiser wouldn't remove the move construst). The GCC implementation was effectively illegal and just worked by luck. Enabling the C++0x semantics finally fixes this, and furthermore lets the optimiser know what's going on which should help greatly. The move semantics in TnFOX always operated on a pointer, so speed increases will be nil - however, once C++0x support is added to the STL containers, some operations on value copy items will be immensely faster.

As of v0.88 of TnFOX, the following C++0x features have been implemented. This list is limited by what the latest GCC has implemented:

  1. Move constructors using rvalue references (N2118) have been implemented in most of the class objects which might end up in a container have move constructors where possible.
  2. FXSTATIC_ASSERT() will use the new static_assert() function (N1720). This greatly improves error message reporting.
  3. FX::FXException will use the new __func__ meta-variable (N2340) in error reporting.

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 21:55:17 2008 for TnFOX by doxygen v1.5.6