title: How to make Insure++ work with boost and g++ 3.4.x
body: <p>I have linux development environment with g++ 3.4.6, boost 1.47 (latest) and Insure++.
  Before I added boost everything was compiling fine. After I tried to compile simple test using boost header only libraries I get this:</p>
  
  <pre><code>11/3/11 8:58:37 AM CET: insure g++ -Zstl -Zop /root/.pulse2-agent/data/work/insure/shared/misc/insure.opt -c -DXF_PROFILE  -o temp/linux_x86/test_boost.o -Wall -Werror -pthread -g   -I. -I../../../shared/libs/libtommath-0.41 -I../../../shared/libs/expat-1.95.8/lib -I../../../shared/generic -I../../../shared/test -I../../../shared/libs/sentinel_hasp -I../../../shared/libs/sqlite -I../../../shared/generated -I/boost test_boost.cpp
  11/3/11 8:58:37 AM CET: [container_fwd.hpp:64] **PARSE_ERROR**
  11/3/11 8:58:37 AM CET:   Parse error.
  11/3/11 8:58:37 AM CET: &gt;&gt;     template &lt;class charT, class traits, class Allocator&gt; class basic_string;
  11/3/11 8:58:37 AM CET: too few template parameters -- does not match previous declaration
  11/3/11 8:58:37 AM CET: [container_fwd.hpp:87] **PARSE_ERROR**
  11/3/11 8:58:37 AM CET:   Parse error.
  11/3/11 8:58:37 AM CET: &gt;&gt;     template &lt;class T, class Allocator&gt; class vector;
  11/3/11 8:58:37 AM CET: too few template parameters -- does not match previous declaration
  11/3/11 8:58:37 AM CET: [container_fwd.hpp:88] **PARSE_ERROR**
  11/3/11 8:58:37 AM CET:   Parse error.
  11/3/11 8:58:37 AM CET: &gt;&gt;     template &lt;class Key, class T, class Compare, class Allocator&gt; class map;
  11/3/11 8:58:37 AM CET: too few template parameters -- does not match previous declaration
  11/3/11 8:58:37 AM CET: [container_fwd.hpp:89] **PARSE_ERROR**
  11/3/11 8:58:37 AM CET:   Parse error.
  11/3/11 8:58:37 AM CET: &gt;&gt;     template &lt;class Key, class T, class Compare, class Allocator&gt;
  11/3/11 8:58:37 AM CET: too few template parameters -- does not match previous declaration
  11/3/11 8:58:37 AM CET: [container_fwd.hpp:91] **PARSE_ERROR**
  11/3/11 8:58:37 AM CET:   Parse error.
  11/3/11 8:58:37 AM CET: &gt;&gt;     template &lt;class Key, class Compare, class Allocator&gt; class set;
  11/3/11 8:58:37 AM CET: too few template parameters -- does not match previous declaration
  11/3/11 8:58:37 AM CET: [container_fwd.hpp:92] **PARSE_ERROR**
  11/3/11 8:58:37 AM CET:   Parse error.
  11/3/11 8:58:37 AM CET: &gt;&gt;     template &lt;class Key, class Compare, class Allocator&gt; class multiset;
  11/3/11 8:58:37 AM CET: too few template parameters -- does not match previous declaration
  11/3/11 8:58:37 AM CET: Driver: error executing "Run "-Zoicompiler /usr/local/bin/g++" -Zstl -Zop /root/.pulse2-agent/data/work/insure/shared/misc/insure.opt -c -DXF_PROFILE -o temp/linux_x86/test_boost.o -Wall -Werror -pthread -g -I. -I../../../shared/libs/libtommath-0.41 -I../../../shared/libs/expat-1.95.8/lib -I../../../shared/generic -I../../../shared/test -I../../../shared/libs/sentinel_hasp -I../../../shared/libs/sqlite -I../../../shared/generated -I/boost test_boost.cpp"
  </code></pre>
  
  <p>Without Insure++ it compiles just fine. Unlucky I cannot change compiler to new one because of internal project structure. </p>
  
  <p>Any idea what is the real problem and how I can solve this?</p>
  
  <p>/edit</p>
  
  <p>I read somewhere that problems of that kind could be caused by incorrect forward declarations in the boost itself. So I added to my test before boost headers:</p>
  
  <pre><code>#define BOOST_DETAIL_NO_CONTAINER_FWD
  </code></pre>
  
  <p>And now it doesn't report any problems, but crashing completely during the compilation:</p>
  
  <pre><code>insure g++ -Zstl -Zop /root/x-formation-pk/shared/misc/insure.opt -c -DXF_PROFILE  -o temp/linux_x86/test_boost.o -Wall -Werror -pthread -g   -I. -I../../../shared/libs/libtommath-0.41 -I../../../shared/libs/expat-1.95.8/lib -I../../../shared/generic -I../../../shared/test -I../../../shared/libs/sentinel_hasp -I../../../shared/libs/sqlite -I../../../shared/generated -I/boost test_boost.cpp
  Driver: error executing "Run "-Zoicompiler /usr/local/bin/g++" -Zstl -Zop /root/x-formation-pk/shared/misc/insure.opt -c -DXF_PROFILE -o temp/linux_x86/test_boost.o -Wall -Werror -pthread -g -I. -I../../../shared/libs/libtommath-0.41 -I../../../shared/libs/expat-1.95.8/lib -I../../../shared/generic -I../../../shared/test -I../../../shared/libs/sentinel_hasp -I../../../shared/libs/sqlite -I../../../shared/generated -I/boost test_boost.cpp"
  makepp: error: Failed to build targets `/root/x-formation-pk/shared/generic/test/temp/linux_x86/test_boost.lob' `/root/x-formation-pk/shared/generic/test/temp/linux_x86/test_boost.o' [2]
  </code></pre>