|
Boost Users : |
Subject: Re: [Boost-users] [ICL] intersects(interval_set< int >, int) doesn't compile
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2011-02-18 07:38:39
John Reid wrote:
> AFAICT from the docs the following should compile:
>
> #include <boost/icl/interval_set.hpp>
>
> namespace icl = ::boost::icl;
>
> void interval_set_intersects() {
> icl::intersects( icl::interval_set< int >(), 1 );
> }
>
>
>
> but I get a no match error:
>
> gcc.compile.c++ bin/gcc-4.4.3/debug/src/sandbox.o
> src/sandbox.cpp: In function void interval_set_intersects():
> src/sandbox.cpp:7: error: No match for
> intersects(boost::icl::interval_set<int, less,
> boost::icl::discrete_interval<int, less>, allocator> &, int)
Just a shot, but have you noticed the first argument is by reference,
and you are passing a temporary? Does the following work:
{
icl::interval_set<int> iclset;
icl::intersects( iclset, 1 );
}
Jeff
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