Opened 6 years ago
Closed 6 years ago
#12329 closed Bugs (wontfix)
typedef argument_type missing on optional<T&>
Reported by: | Owned by: | Fernando Cacciola | |
---|---|---|---|
Milestone: | To Be Determined | Component: | optional |
Version: | Boost 1.61.0 | Severity: | Regression |
Keywords: | Cc: |
Description
Hi,
Any reason why typedef argument_type has been removed in the new specialization of optional<T&>?
To have the same typedefs between optional<T> and optional<T&>, it would be nice to add the following in the specialization of optional<T&>:
typedef T& argument_type;
This allows also to keep compatibility on public interface of the old optional implementation, except of course if there is a good reason to have removing this typedef...
Regards,
Daniel.
Change History (3)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
reference_type, reference_const_type, rval_reference_type typedefs also already do this. This was just for using a unique typedef argument_type to have:
- T const& for optional<T>
- T& for optional<T&>
But now, I see that I can use the typedef reference_const_type instead for this purpose. For optional<T>, it seems that reference_const_type and argument_type are redundant.
Anyway, this ticket was just a nice to have... It can be closed.
comment:3 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
there is a typedef value_type that already does this. Can you use value_type instead?