|
Boost : |
Subject: Re: [boost] [parameter] type requirement compiler error
From: Cromwell Enage (sponage_at_[hidden])
Date: 2011-11-04 22:53:02
From: Lorenzo Caminiti
> The following example raises the same Boost.Parameter error
> and it uses no graph library:
// File: 01.cpp
#include <boost/parameter.hpp>
#include <iostream>
BOOST_PARAMETER_NAME(x)
BOOST_PARAMETER_NAME(y)
BOOST_PARAMETER_FUNCTION(
(void),
f,
tag,
(required
(x, *)
(y, (tag::x::_))
)
) {
std::cout << x << " " << y << std::endl;
}
int main ( void )
{
f(1, 2);
return 0;
}
Reply:
IME you can't use (void) as a return type. As a workaround I use (bool) and return a constant (true or false).
HTH,
Cromwell D. Enage
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk