Opened 11 years ago

Closed 11 years ago

#5905 closed Patches (fixed)

Making switch matching on the result type of a transform

Reported by: Pierre Esterie <pesterie@…> Owned by: Eric Niebler
Milestone: To Be Determined Component: proto
Version: Boost 1.47.0 Severity: Optimization
Keywords: Cc: Joel Falcou

Description

Hi,

As discussed in the following thread : http://lists.boost.org/proto/2011/08/0559.php

I made a patch on trunk to implement what was discussed. Please, find in attached file the corresponding patch for code reviewing and discussion.

Best,

Pierre Esterie

Attachments (2)

new_switch.patch (7.3 KB ) - added by Pierre Esterie <pesterie@…> 11 years ago.
patch_switch
new_switch.2.patch (12.1 KB ) - added by Pierre Esterie <pesterie@…> 11 years ago.

Download all attachments as: .zip

Change History (6)

by Pierre Esterie <pesterie@…>, 11 years ago

Attachment: new_switch.patch added

patch_switch

comment:1 by Eric Niebler, 11 years ago

Looks good. Some feedback. The biggest problem is the lack of changes to the reference docs for switch_ (see libs/proto/doc/reference/matches.xml), the missing new_switch.cpp test file, and the formatting that is inconsistent with the rest of Proto's source code. Note: I use 4-spaces for indenting.

Also, you can remove the specialization of switch_::impl in the primary switch_ template. It's still necessary in the specialization of switch_ for the default transform.

Thanks for your work on this!

by Pierre Esterie <pesterie@…>, 11 years ago

Attachment: new_switch.2.patch added

comment:2 by Pierre Esterie <pesterie@…>, 11 years ago

Hi Eric,

I modified the patch, you can find the new one in attached file. Please Let me know if I missed something again.

Thanks by advance ! Best,

Pierre

comment:3 by Eric Niebler, 11 years ago

Thanks. Committed to trunk in [74513]. I'll keep an eye on the regression results and merge to release if it looks good.

comment:4 by Eric Niebler, 11 years ago

Resolution: fixed
Status: newclosed

(In [74534]) merge [74470], [74481], [74513], [74527] from trunk; fixes #4723, #5905

Note: See TracTickets for help on using tickets.