37 #include <OpenMS/config.h> 49 template <
typename FloatingPo
intType>
57 FloatingPointType
const ref_;
95 template <
typename FloatingPo
intType>
102 template <
typename FloatingPo
intType>
103 inline std::ostream & operator<<(std::ostream & os, const PrecisionWrapper<FloatingPointType> & rhs)
106 #pragma clang diagnostic push 107 #pragma clang diagnostic ignored "-Wfloat-equal" 108 if (rhs.ref_ != rhs.ref_)
109 #pragma clang diagnostic pop 117 const std::streamsize prec_save = os.precision();
120 os.precision(prec_save);
Int writtenDigits(const FloatingPointType &=FloatingPointType())
Number of digits commonly used for writing a floating point type (a.k.a. precision). Specializations are defined for float, double, long double.
Definition: Types.h:294
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
const PrecisionWrapper< FloatingPointType > precisionWrapper(const FloatingPointType rhs)
Wrapper function that sets the appropriate precision for output temporarily. The original precision i...
Definition: PrecisionWrapper.h:96
PrecisionWrapper(const FloatingPointType rhs)
Constructor. Note: Normally you will prefer to use the "make"-function precisionWrapper(), which see.
Definition: PrecisionWrapper.h:53
Wrapper class to implement output with appropriate precision. See precisionWrapper().
Definition: PrecisionWrapper.h:50
FloatingPointType const ref_
Definition: PrecisionWrapper.h:57
PrecisionWrapper(const PrecisionWrapper &rhs)
Definition: PrecisionWrapper.h:55