[PPL-devel] problems with Box::operator<<
Gianluca Amato
amato at sci.unich.it
Tue Jan 17 17:24:46 CET 2012
Hi all,
I have a problem using operator<< with boxes. The following code does
not compile with PPL 0.11.2 and gcc 4.6.1.
----
#include <ppl.hh>
#include <iostream>
using namespace Parma_Polyhedra_Library;
struct Floating_Point_Box_Interval_Info_Policy {
const_bool_nodef(store_special, false);
const_bool_nodef(store_open, true);
const_bool_nodef(cache_empty, true);
const_bool_nodef(cache_singleton, true);
const_bool_nodef(cache_normalized, false);
const_int_nodef(next_bit, 0);
const_bool_nodef(may_be_empty, true);
const_bool_nodef(may_contain_infinity, false);
const_bool_nodef(check_empty_result, false);
const_bool_nodef(check_inexact, false);
};
typedef Interval_Restriction_None<Interval_Info_Bitset
<unsigned int,
Floating_Point_Box_Interval_Info_Policy> >
Floating_Point_Box_Interval_Info;
typedef Box<Interval<double, Floating_Point_Box_Interval_Info> > Double_Box;
int main(void) {
Double_Box db;
db.print();
std::cout << db;
return 0;
}
---
The offending line is the one with std::cout << db, which gives the
following error:
no match for ‘operator<<’ in ‘std::cout << db’
I am not an expert neither with C++ nor with PPL, so I don't known if
there is an obvious mistake in my code. Can someone give me an hint?
Thanks,
--gianluca
More information about the PPL-devel
mailing list