Subject: Re: [boost] [Fit]Â formal review starts today
From: paul Fultz (pfultz2_at_[hidden])
Date: 2016-03-04 12:37:27
>> - Different functions in the library do not
>> have a consistent interface for similar
>> - always/always_ref vs. capture/capture_forward/capture_decay vs
>> partial w/ std::ref.
`alway_ref should be just an implementation detail. The user can already write
`always(std::ref(x)) if they want a reference. I only use this to try and save
`some template instantiations when I need to the always_ref(*this)(xs...)
>> 145: // Since we disable the error for 4579 on MSVC, which leaves the
>> // member unitialized at runtime, it is, therefore, only safe to
>> use this
>> // class on types that are empty with constructors that have no
>> // side effects.
>> Shouldn't it also be safe for types with trivial
>> default constructors, since then, zero-initialization
>> will do the right thing?
> That is probably another case as well.
Sorry this is wrong. The value is uninitialized. So its only valid when there is
no data members to initialize(ie is_empty<T>) and the constructors have no
side effects(ie is_literal<T>). Since it is uninitialized you can't expect it
be zero-initialized either.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk