
Hi, Boost.Array defines the following assignment template (* typename U *) array(* T,N *)& operator=(const array(* U, N *)&); as std::copy(rhs.begin(),rhs.end(), begin()) 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 *)&); Best, Vicente P.S. Please replace (* and *) by angle brackets. -- View this message in context: http://boost.2283326.n4.nabble.com/array-assignment-and-constructor-coherenc... Sent from the Boost - Dev mailing list archive at Nabble.com.

On 17 June 2011 12:03, Vicente Botet <vicente.botet@wanadoo.fr> 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@eviloverlord.com> (847) 691-1404

Nevin Liber wrote:
On 17 June 2011 12:03, Vicente Botet <vicente.botet@wanadoo.fr> 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.
Oh, I didn't thought to that. This is a sufficient reason. Thanks a lot, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/array-assignment-and-constructor-coherenc... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (2)
-
Nevin Liber
-
Vicente Botet