Boost C++ Libraries: Ticket #2381: [interprocess] invalid use of incomplete type std::istream https://svn.boost.org/trac10/ticket/2381 <p> From <a class="ext-link" href="http://tinyurl.com/45g4g4"><span class="icon">​</span>this log</a>: </p> <pre class="wiki"> "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -m64 -march=nocona -pthread -fPIC -nostdinc++ -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -D_RWSTDDEBUG -I".." -I"/var/tmp/stdcxx/4.2.x/gcc/15D/include" -I"/var/tmp/stdcxx/4.2.x/include" -I"/var/tmp/stdcxx/4.2.x/include/ansi" -c -o "/var/tmp/boost/results/boost/bin.v2/libs/interprocess/test/vectorstream_test.test/gcc-4.3.0_stdcxx_422/debug/address-model-64/architecture-x86/instruction-set-nocona/stdlib-stdcxx-4.2.2/threading-multi/vectorstream_test.o" "../libs/interprocess/test/vectorstream_test.cpp" In file included from ../libs/interprocess/test/vectorstream_test.cpp:12: ../boost/interprocess/containers/string.hpp: In function ???std::basic_istream&lt;_CharT, _Traits&gt;&amp; boost::interprocess::getline(std::istream&amp;, boost::interprocess::basic_string&lt;CharT, Traits, A&gt;&amp;, CharT)???: ../boost/interprocess/containers/string.hpp:2398: error: invalid use of incomplete type ???struct std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;??? /var/tmp/stdcxx/4.2.x/include/rw/_iosfwd.h:69: error: declaration of ???struct std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;??? ../boost/interprocess/containers/string.hpp:2405: error: invalid use of incomplete type ???struct std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;??? /var/tmp/stdcxx/4.2.x/include/rw/_iosfwd.h:69: error: declaration of ???struct std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;??? ../boost/interprocess/containers/string.hpp:2419: error: invalid use of incomplete type ???struct std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;??? /var/tmp/stdcxx/4.2.x/include/rw/_iosfwd.h:69: error: declaration of ???struct std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;??? </pre><blockquote> <p> Using of the std::istream class methods requires #including &lt;istream&gt; header file. There also used std::ostream class methods. </p> </blockquote> <blockquote> <p> The proposed patch: </p> </blockquote> <pre class="wiki">Index: boost/interprocess/containers/string.hpp =================================================================== --- boost/interprocess/containers/string.hpp (revision 49128) +++ boost/interprocess/containers/string.hpp (working copy) @@ -51,6 +51,8 @@ #include &lt;algorithm&gt; #include &lt;iosfwd&gt; #include &lt;ios&gt; +#include &lt;istream&gt; +#include &lt;ostream&gt; #include &lt;locale&gt; #include &lt;cstddef&gt; #include &lt;climits&gt; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2381 Trac 1.4.3 Ion Gaztañaga Tue, 18 Nov 2008 08:02:53 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2381#comment:1 https://svn.boost.org/trac10/ticket/2381#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in Boost 1.37. Thanks for the report. </p> Ticket