Boost logo

Boost :

Subject: Re: [boost] [array] assignment and constructor coherency
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-06-17 13:19:27


On 17 June 2011 12:03, Vicente Botet <vicente.botet_at_[hidden]> wrote:

> Boost.Array defines the following assignment
>
> template (* typename U *)
> array(* T,N *)& operator=(const array(* U, N *)&);
>

> Even if the standard doesn't provides this conversion assignment, for
> coherency purposes, shouldn't we have also the copy constructor
>
> template (* typename U *)
> explicit array(* T,N *)(const array(* U, N *)&);
>

The existence of any user defined constructor destroys PODness.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk