Boost logo

Boost :

Subject: [boost] [Accumulators + Signals2] Compilation error with GCC when both are used
From: sguazt (marco.guazzone_at_[hidden])
Date: 2011-06-09 09:04:41


Hello,

It seems that Accumulators and Signals2 have problems to coexist.
For instance, look at the following simple C++ program:

--- [c++] ---
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/signals2.hpp>

int main()
{
}
--- [/c++] ---

If I compile it with GCC 4.6.0 (under Fedora Linux 15 x86_64):
  $ g++ -Wall -Wextra -pedantic -ansi -I,/boost-trunk -o
boost_signals2_accumulators boost_signals2_accumulators.cpp

I get the following errors:
--- [error] ---
In file included from ./boost-trunk/boost/signals2.hpp:20:0,
                 from boost_signals2_accumulators.cpp:4:
./boost-trunk/boost/signals2/signal_type.hpp:29:2: error: #error This
header requires BOOST_PARAMETER_MAX_ARITY to be defined as 7 or
greater prior to including Boost.Parameter headers
In file included from ./boost-trunk/boost/signals2.hpp:20:0,
                 from boost_signals2_accumulators.cpp:4:
./boost-trunk/boost/signals2/signal_type.hpp:78:9: error: wrong number
of template arguments (6, should be 5)
./boost-trunk/boost/parameter/parameters.hpp:714:8: error: provided
for ‘template<class PS0, class PS1, class PS2, class PS3, class PS4>
struct boost::parameter::parameters’
./boost-trunk/boost/signals2/signal_type.hpp:83:9: error:
‘parameter_spec’ is not a class or namespace
./boost-trunk/boost/signals2/signal_type.hpp:83:29: error: expected
unqualified-id before ‘<’ token
./boost-trunk/boost/signals2/signal_type.hpp:99:11: error: ‘args’ was
not declared in this scope
./boost-trunk/boost/signals2/signal_type.hpp:105:9: error: template
argument 1 is invalid
./boost-trunk/boost/signals2/signal_type.hpp:108:31: error: ‘args’ was
not declared in this scope
./boost-trunk/boost/signals2/signal_type.hpp:108:67: error: template
argument 1 is invalid
./boost-trunk/boost/signals2/signal_type.hpp:111:31: error: ‘args’ was
not declared in this scope
./boost-trunk/boost/signals2/signal_type.hpp:111:94: error: template
argument 1 is invalid
./boost-trunk/boost/signals2/signal_type.hpp:115:31: error: ‘args’ was
not declared in this scope
./boost-trunk/boost/signals2/signal_type.hpp:115:97: error: template
argument 1 is invalid
./boost-trunk/boost/signals2/signal_type.hpp:121:13: error: ‘args’ was
not declared in this scope
./boost-trunk/boost/signals2/signal_type.hpp:124:11: error: template
argument 1 is invalid
./boost-trunk/boost/signals2/signal_type.hpp:128:31: error: ‘args’ was
not declared in this scope
./boost-trunk/boost/signals2/signal_type.hpp:128:69: error: template
argument 1 is invalid
--- [/error] ---

I've tried both with last Boost devel version and Boost 1.46.0.

Note, I have no problem if one of the two libraries are not used (e.g.
if I comment either the first 3 #includes or the last one).

Any idea?

Thank you very much!!

Best,

-- Marco


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