[mlpack] [mlpack/mlpack] Log::Info has incompatibility issue with some iomanip functions (#755)
Shikhar Bhardwaj
notifications at github.com
Thu Dec 15 09:07:42 EST 2016
I had a look through the code in `prefixedoutstream.hpp` and `prefixedoutstream_impl.hpp`.
Converting each output to a string causes the floating-point types to lose the type information needed by the `destination` stream to output the necessary precision.
I could imagine two solutions to the problem
1. Introduce 3 inline template specialisations for `util::prefixedoutstream::BaseLogic` for `float`, `double` and `long double`, each of which directly writes the `val` to the `destination` stream.
2. Use SFINAE on `BaseLogic` to write `val` directly to the `destination` if the type satisfies `std::is_floating_point`.
Any thoughts?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/755#issuecomment-267335519
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://knife.lugatgt.org/pipermail/mlpack/attachments/20161215/4865eba5/attachment.html>
More information about the mlpack
mailing list