
Boost Users : 
Subject: [Boostusers] [boostusers][Container] Compilation error using new "static_vector".
From: Jupp Tscheak (jupp.tscheak_at_[hidden])
Date: 20130719 09:31:40
Hello boost users,
Please consider the following example:
[code]
#include "CGAL/Cartesian.h"
#include "CGAL/Polygon_2.h"
#include "boost/container/static_vector.hpp"
typedef CGAL::Cartesian<double> Kernel;
typedef Kernel::Point_2 Point2d;
typedef CGAL::Polygon_2<Kernel, boost::container::static_vector<Point2d, 100> > Polygon2d;
Polygon2d p;
p = Polygon2d();
[/code]
Compiling this code snippet with GCC results in following error message:
[error]
error: no match for 'operator=' in 'p = CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >((*(const Traits*)(& CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >::Traits())))'
note: candidate is:
CGAL4.2/include/CGAL/Polygon_2.h:68:7: note: CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >& CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >::operator=(CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >&)
CGAL4.2/include/CGAL/Polygon_2.h:68:7: note: no known conversion for argument 1 from 'sensor::Polygon2d {aka CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >}' to 'CGAL::Polygon_2<CGAL::Cartesian<double>, boost::container::static_vector<CGAL::Point_2<CGAL::Cartesian<double> >, 100u> >&'
[/error]
I apologize for this concrete example using CGAL, but maybe someone has advice for me?
Thanks in advance!
Jupp Tscheak
Boostusers 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