Opened 11 years ago

Closed 10 years ago

#5790 closed Bugs (fixed)

call_traits::param_type generates const references for enums

Reported by: defaultryan+boost@… Owned by: John Maddock
Milestone: To Be Determined Component: call_traits
Version: Boost 1.47.0 Severity: Problem
Keywords: param_type enum is_enum Cc:

Description

call_traits<SomeEnum>::param_type currently evaluates to "const SomeEnum&" instead of "const SomeEnum".

Seems that since call_traits is using is_arithmetic to funnel down into ct_imp2<T, true>, we could also use is_enum to send us down the same path and get the desired behavior.

Change History (4)

comment:1 by defaultryan+boost@…, 11 years ago

More specifically, change line 82 from

::boost::is_arithmetic<T>::value

to

::boost::is_arithmetic<T>::value || ::boost::is_enum<T>::value

comment:2 by John Maddock, 11 years ago

Resolution: fixed
Status: newclosed

(In [73953]) Change call_traits to pass enum's by value. Fixes #5790.

comment:3 by anonymous, 10 years ago

Resolution: fixed
Status: closedreopened

Reopening because this hasn't been merged to release yet.

comment:4 by John Maddock, 10 years ago

Resolution: fixed
Status: reopenedclosed

(In [80433]) Merge changes from Trunk. Fixes #5790.

Note: See TracTickets for help on using tickets.