$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [optional] generates unnessesary code for trivial types
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-01-27 16:31:25
On Friday, January 27, 2012 18:57:30 Simonson, Lucanus J wrote:
>
> Optional was implemented to be safe and slow because it was targeting safe
> and slow use cases. For POD types and anything that has a default
> constructor a std::pair<bool, T> seems fine to me.
I'm failing to see why optional should be slow. I use it extensively, POD
types included, and I don't consider pair<bool, T> as a valid replacement.
I'll be glad if it gets optimized for POD types, why not?