Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-02-17 09:11:52


BCB 6.4, Boost 1.31 (1.30.2 fails too).

Following snippet fails to compile:
----------------------------------------
#include <boost/function.hpp> // remove and it will compile OK
#define BOOST_MEM_FN_ENABLE_FASTCALL // or remove this and it will be OK
#include <boost/bind.hpp> // or move <function.hpp> after <bind.hpp> and it
will compile OK

int main() {
    return 0;
}
----------------------------------------

with error:

[C++ Error] bind_mf_cc.hpp(20): E2316 'mf0_fastcall' is not a member of
'_mfi'
  Full parser context
    Unit1.cpp(6): #include C:\boost\boost_1_31_0\boost/bind.hpp
    bind.hpp(44): namespace boost
    bind.hpp(1544): #include C:\boost\boost_1_31_0\boost/bind/bind_mf_cc.hpp
[C++ Error] bind_mf_cc.hpp(20): E2040 Declaration terminated incorrectly
  Full parser context
    Unit1.cpp(6): #include C:\boost\boost_1_31_0\boost/bind.hpp
    bind.hpp(44): namespace boost
    bind.hpp(1544): #include C:\boost\boost_1_31_0\boost/bind/bind_mf_cc.hpp
[C++ Error] bind.hpp(1577): E2190 Unexpected }
  Full parser context
    Unit1.cpp(6): #include C:\boost\boost_1_31_0\boost/bind.hpp

When the
#include <boost/function.hpp>
is removed it compiles cleanly.

The code compiles OK on Intel C++ so it seems
to be caused by some strange interaction with
Boost.Function.

/Pavel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk