Which C++ language features cause porting problems?
Our suggestions for Charm++ developers are: • Never declare the same loop index inside two adjacent loops. The C++ standard recently changed to make this legal: for (int i=…) … for (int i=…) … However, many compilers choke on the above, complaining of “duplicate declaration of int i”. Instead, use: int i; for (i=…) … for (i=…) … • Be wary of the C++ STL (Standard Template Library). Many compilers (such as Alpha cxx) do not accept the new-style ANSI header names without “.h”, like