
29 Jan
2007
29 Jan
'07
6:53 p.m.
AMDG Noah Roberts wrote:
Matthias Schabel wrote:
Any input on optimizing the library would be most welcome - I expect that it should be possible to have code using quantities run exactly as fast as for built in types, but that remains to be proven...
So far that seems to run true if you use the highest optimization level for g++. In VC++ I'm finding otherwise.
The cause is probably that quantity defines a destructor. It does exactly what the compiler generated one does, so there is no reason to define it explicitly. Just comment it out. msvc refuses to inline any function that returns a type with a non-trivial destructor when exceptions are enabled. In Christ, Steven Watanabe