Developers' Notes
Documentation Issues
General Problems
Known SGI compiler gotchas
- SGI doesn't have ostream.h make sure you use iostream.h
- < T > a[0] = {} will fail you must give a size > 0
- consts must always be assigned after non consts, so always do:
const int a;
int b;
a = b = 0;
rather than
b = a = 0;
- If an argument is declared const *&, the SGI compiler expects the variable you put in the argument to be a const ptr.
- Constructs of the type myclass < T > a = 1.0 cause troubles as the SGI compiler isn't very smart about temporary conversions.
- Conversion involving const numbers to Floats need to be done explicitly.
Something line MyClass < Float > a = 1.0; fails cause it can't cast the 1.0 to a
float. Use MyClass < Float > a = 1.0f;
- Problems with arguments not being promoted, i.e. float to double,
especially for min and max. The
following code snippet fails on the SGI
Float x;
Double maxX = max(x, 1.0)
The SGI complains that there is no declaration for
max(float, double). It basically fails to promote float to double.
Please try and keep the arguments the same type for max and min, i.e.
Float x;
Double maxX = max(x, 1.0f)
- tMuvw failed for some obsure reason on the following construct
cout << "Pos constructor:" << MVuvw(x, x2) << endl;
where x and x2 are MVuvw's
- If you have an ImageInterface and pass it as an argument to a
method/function that expects a
Lattice, SubLattice, or MaskedLattice, you will need to call
the latticeCast member function. The SGI compiler is too dumb to figure this
out.
- If you assign const pointers to non-const pointer you need to cast away the constness.
- Make sure inlined functions are defined in your .h file and not the .cc file.
- Statements like
flag ? delete pointer : 0;
fail with the SGI compiler, please use an if statement.
Send comments or questions about AIPS++
to aips2-requests@nrao.edu
Copyright © 1995, 1996, 1997, 1998, 1999, 2000 Associated Universities Inc.,
Washington, D.C.