|
Boost Users : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-02-21 15:07:39
AMDG
Olaf Peter wrote:
> Hi Steven,
>
> the problem is related to the static_visitor, e.g. (from docs):
>
>
> boost::variant< int, std::string > u;
> ...
>
> class my_visitor : public boost::static_visitor<int> {
> public:
> int operator()(int i) const
> {return i;}
>
> int operator()(const std::string & str) const
> {return str.length(); }
> };
>
> same for static_visitor<> etc. BUT static_visitor<bool>:
>
> <snip>
>
> is binary! I've got compilation errors due to.
>
apply_visitor can handle two arguments:
apply_visitor(are_strict_equals(), v1, v2)
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net