Subject: CGAL users discussion list
List archive
- From: Daniel Duque <>
- To: cgal-discuss <>
- Subject: [cgal-discuss] Vector default initialization
- Date: Tue, 24 Mar 2015 10:01:51 +0100
Hi,
Just a simple question. Are vectors, in particular 2D vectors,
initialized to anything by default? I am getting some some of
garbage with uninitialized vectors, so I ended up writting the
not too elegant derived class to have them initialized to null
vectors.
Commented out lines would be a templated version of the trick,
which I don't need right now.
Is this a good idea?
Thanks!
Daniel
typedef CGAL::Vector_2<K> Vector_2;
//template<class K>
class autoVector_2 :
public
//CGAL::Vector_2<K> {
Vector_2 {
//typedef CGAL::Vector_2<K> Vector_2;
public:
autoVector_2() : Vector_2(CGAL::NULL_VECTOR) {}
autoVector_2(const Vector_2& v) : Vector_2(v) {}
};
- [cgal-discuss] Vector default initialization, Daniel Duque, 03/24/2015
Archive powered by MHonArc 2.6.18.