Simbody  3.7
SimTK::conjugate< R > Class Template Reference

SimTK::conjugate<R> should be instantiated only for float, double. More...

Detailed Description

template<class R>
class SimTK::conjugate< R >

SimTK::conjugate<R> should be instantiated only for float, double.

This should behave just like std::complex<R> and in most cases we'll just convert and punt to the std class.

The three specializations are almost identical, but differ in the rules for implicit conversion. Implicit conversions are allowed from a narrow type to a wider one, but the other direction must be explicit.

Some of this could be done more compactly with member templates, helper classes and so on, but this can make debugging of client programs very awkward, both by producing indecipherable error messages when compiling and by referencing unexpanded template code when debugging. Since this class need only be done once, and has a grand total of three specializations, I felt it made more sense to do each of them explicitly here (sherm 051006).


The documentation for this class was generated from the following file: