Opened 15 years ago

Closed 9 years ago

Last modified 9 years ago

#1724 closed Feature Requests (invalid)

[ref] DefaultConstructible

Reported by: Shunsuke Sogame <pstade.mb@…> Owned by: ebf
Milestone: Boost 1.36.0 Component: variant
Version: Boost Development Trunk Severity: Problem
Keywords: ref reference_wrapper Cc: antoshkka@…

Description

I request boost::reference_wrapper<T> be DefaultConstructible for conforming ForwardIterator holding a FunctionObject which captures arguments by-reference using boost::reference_wrapper<T>.

Change History (2)

comment:1 by Antony Polukhin, 9 years ago

Resolution: invalid
Status: newclosed

If you are talking about the boost::recursive_wrapper<T>, which is part of the Boost.Variant library, then it is already default constructible.

If you are talking about boost::reference_wrapper<T> then this is not possible. boost::reference_wrapper<T> must behave exactly like a reference and you can not default construct a reference in C++.

comment:2 by Antony Polukhin, 9 years ago

Cc: antoshkka@… added
Note: See TracTickets for help on using tickets.