Boost logo

Boost :

Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: degski (degski_at_[hidden])
Date: 2017-10-06 02:25:22


On 5 October 2017 at 20:23, Thorsten Ottosen via Boost <
boost_at_[hidden]> wrote:

> Cute.

I'll tell the wife!

But would one not use std::is_trivially_copyable instead of
> std::is_arithmetic?
>

The std::vector code is done this way. I assume(d) the library writers are
well aware of std::is_trivially_copyable.

> And instead of resize, should you not call the version that avoids double
> initialization?
>

Let me ask that question the other way around. If based on type_traits it
could be worked out (at compile-time) that double initialization can be
avoided, why doesn't resize() do the "right" thing on it's own? resize()
should do what it says it does, and do that in the optimal way, given T.

degski

-- 
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798

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