[Boost-bugs] [Boost C++ Libraries] #4366: Graph with MPI fails to compile due to mismatch between size of types

Subject: [Boost-bugs] [Boost C++ Libraries] #4366: Graph with MPI fails to compile due to mismatch between size of types
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-22 15:02:29


#4366: Graph with MPI fails to compile due to mismatch between size of types
------------------------------------+---------------------------------------
 Reporter: webmaster@… | Owner: asutton
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: graph
  Version: Boost 1.43.0 | Severity: Problem
 Keywords: |
------------------------------------+---------------------------------------
 [BOOST_PATH]/boost/graph/distributed/unsafe_serialize.hpp(40) : error
 C2182: 'abstract declarator' : illegal use of type 'void'

 This error occurs during x64 compilation with MSVC 10.0 under Windows 7
 x64, where sizeof(int) != sizeof(void*) && sizeof(long) != sizeof(void*).

 typedef mpl::if_c<(sizeof(int) == sizeof(void*)),
                   int,
                   mpl::if_c<(sizeof(long) == sizeof(void*)), long,
 void>::type
>::type ptr_serialize_type;

 As Windows uses LLP64 model, which defines a long type as 32bit integer,
 two cascaded conditions fail.
 Then ptr_serialize_type is declared as a void type.
 I think it can be fixed with replacing the last 'void' with 'long long' or
 using conditional compilation for windows under x64.

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