Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-04-17 05:18:28

Hartmut Kaiser wrote:
> Hi all,
> compiling Boost Python while having the Boost TR1 headers in the
> include
> path is broken in V1.35 (trunk as well, BTW), at least while using
> VC8.1 on Windows or gcc on Cygwin.
> The simplest way to reproduce this is:
> create a file test.cpp:
> #include <boost/python.hpp>

Hi Harmut, this is nasty because TR1 and Boost.Function have a mutual
(circular) dependency :-(

The reduced test case is:

#include <boost/function/function0.hpp>


#include <boost/function.hpp>

works just fine.

Doug the following patch fixes this problem, is this acceptable to you?

Index: C:/data/boost/boost/trunk/boost/function/detail/prologue.hpp
--- C:/data/boost/boost/trunk/boost/function/detail/prologue.hpp (revision
+++ C:/data/boost/boost/trunk/boost/function/detail/prologue.hpp (working
@@ -11,7 +11,7 @@
 # include <cassert>
 # include <algorithm>
-# include <functional> // unary_function, binary_function
+# include <boost/config/no_tr1/functional.hpp> // unary_function,
 # include <boost/throw_exception.hpp>
 # include <boost/config.hpp>
 # include <boost/function/function_base.hpp>

HTH, John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at