Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8327: iostream header and std::cout in hpp files must be removed.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-23 13:43:06
#8327: iostream header and std::cout in hpp files must be removed.
-------------------------------+--------------------------------------------
Reporter: pjtsu | Owner: johnmaddock
Type: Support Requests | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by pjtsu):
Replying to [comment:1 johnmaddock]:
Thank you for your reply.
> 1) The compiler is entitled to reject PrintTest if std::endl and
std::distance have not been declared ''even if the function is never
instantiated''. GCC and Clang are examples that will do this.
Sorry, I did not check on GCC.[[BR]][[BR]]
> 2) iostream and associated headers are part of the standard, it's not
unreasonable to reply on them.
Windows GUI application can build with cout, but the application don't
have I/O console.[[BR]]
Therefore '''ostringstream''', '''ofstream''' or user-customized stream
like may be used alternativelly.[[BR]]
If stream argument is not ostream but template-type, independent class
from ostream can be used. (as like '''CDumpContext''' in MFC. ... though
std::endl must be removed.)[[BR]]
{{{#!C++
// not so great
template <typename Iter>
void PrintTest(std::ostream& ostr, Iter first, Iter last);
// good
template <typename Stream, typename Iter>
void PrintTest(Stream& ostr, Iter first, Iter last);
}}}
[[BR]]
> 3) The only Math lib header mentioned above is only ever used when
generating new numeric constants so should never be an issue in practice.
>
> There is an include of <iostream> in boost/math/tools/precision.hpp
which isn't needed which I'll remove.
>
> And finally, please file one bug report per library.
All right.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8327#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC