|
Boost : |
From: Marco Costalba (mcostalba_at_[hidden])
Date: 2008-06-05 16:28:42
On Thu, Jun 5, 2008 at 10:08 PM, Marco Costalba <mcostalba_at_[hidden]> wrote:
> On Thu, Jun 5, 2008 at 8:15 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>> AMDG
>>
>> Marco Costalba wrote:
>>> This is very strange given that boost::switch has been dwnloaded from
>>> Vault 1637 times as of now.
>>>
>>
>> Use the version in the sandbox.
>>
>
> Thanks it worked.
>
Well, almost worked ;-)
Indeed I reordered the includes in alphabetical order from
#include <boost/control/switch.hpp>
#include <boost/control/case.hpp>
to
#include <boost/control/case.hpp>
#include <boost/control/switch.hpp>
and this is the result (under gcc)
../../../../boost_1_35_0/boost/control/case.hpp: In function 'R
boost::control::switch_(N,
boost::control::expression_template_case_t<boost::control::restrict_case_t<boost::control::case_group_t<boost::mpl::range_c<T,
low, high>, F> > >)':
../../../../boost_1_35_0/boost/control/case.hpp:191: error: expected
initializer before '<' token
../../../../boost_1_35_0/boost/control/case.hpp:192: error:
'default_construct' is not a member of 'boost::control::switch_detail'
../../../../boost_1_35_0/boost/control/case.hpp:192: error: expected
primary-expression before '>' token
../../../../boost_1_35_0/boost/control/case.hpp:192: error: 'default_'
was not declared in this scope
../../../../boost_1_35_0/boost/control/case.hpp:193: error: 'impl' has
not been declared
../../../../boost_1_35_0/boost/control/case.hpp:193: error: expected
primary-expression before ',' token
../../../../boost_1_35_0/boost/control/case.hpp:193: error: expected
primary-expression before ',' token
It happens that following code in case.hpp
template<class R, class N, class T, T low, T high, class F>
inline R switch_(N n, expression_template_case_t ----stripped---
typedef switch_detail::range_switch_impl<high - low> impl;
switch_detail::default_construct<R> default_;
return(impl::template apply<R, T, low, high>(n,
cases.get().get().get(), default_));
}
needs definitions in switch.hpp
Marco
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk