[Boost-bugs] [Boost C++ Libraries] #2515: [MSVC] ambiguous symbol type_info in boost/python tests

Subject: [Boost-bugs] [Boost C++ Libraries] #2515: [MSVC] ambiguous symbol type_info in boost/python tests
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-19 10:32:17

#2515: [MSVC] ambiguous symbol type_info in boost/python tests
 Reporter: Farid Zaripov <faridz_at_[hidden]> | Owner: dave
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: Python
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
 The most of the boost/python tests are failed to compile on MSVC with
 Apache stdcxx library.

 [http://tinyurl.com/6hdez7 example 1]
 [http://tinyurl.com/5wywqb example 2]

 The reason is that <eh.h> header contains declaration of the:

 int _is_exception_typeof(const type_info &, _EXCEPTION_POINTERS *) ;

 <eh.h> header is included in libs/python/test/module_tail.cpp file. The
 module_tail.cpp is included in other pythons tests at the end of file
 after introducing boost::python symbols in global namespace.

 That tests are compiled successfully on MSVC without stdcxx due to <eh.h>
 implicitly included thus <exception> header (before "using namespace
 boost::python;" directive). But any of the stdcxx headers are not
 including the <eh.h> (see [http://svn.boost.org/trac/boost/ticket/1599
 ticket 1599]).

 The possible solution is explicitly include <eh.h> in every test, that
 includes module_tail.cpp.

 Another solution:

 Index: module_tail.cpp
 --- module_tail.cpp (revision 49830)
 +++ module_tail.cpp (working copy)
 @@ -13,7 +13,9 @@
  # endif

  # ifdef _MSC_VER
 +# define type_info ::type_info
  # include <eh.h> // for _set_se_translator()
 +# undef type_info
  # pragma warning(push)
  # pragma warning(disable:4297)
  # pragma warning(disable:4535)

Ticket URL: <https://svn.boost.org/trac/boost/ticket/2515>
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:49:59 UTC