Opened 14 years ago

Last modified 12 years ago

#2297 new Patches

Workaround for GCC bug

Reported by: Dave Abrahams Owned by: Aleksey Gurtovoy
Milestone: Boost 1.37.0 Component: mpl
Version: Boost 1.36.0 Severity: Problem
Keywords: Cc:

Description

This patch works around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28088, simplifies the code, and ought to speed up compilation a bit into the bargain by instantiating fewer templates. However, whether it breaks on any compilers other than GCC remains to be seen.

Preprocessed headers need to be regenerated, of course.

Attachments (1)

template_arity.patch (2.0 KB ) - added by Dave Abrahams 14 years ago.
The correct improved patch

Download all attachments as: .zip

Change History (4)

by Dave Abrahams, 14 years ago

Attachment: template_arity.patch added

The correct improved patch

comment:1 by Joel Falcou, 12 years ago

Is this patch still valid ? I applied it to my local trunk and tests passes. Now, is it ok to commit it to trunk and wait for a test suite to cycle to see if other compilers accept it ? If not what is the proper protocol to test patches like this ?

comment:2 by Joel Falcou, 12 years ago

OK after applied it and regenerating the preprocessed header I have exactly one failure in the partition.cpp test as mpl::modulus tries to extract ::tag from arg<1>.

I'll investigate further

in reply to:  1 comment:3 by Aleksey Gurtovoy, 12 years ago

Replying to jfalcou:

Is this patch still valid ? I applied it to my local trunk and tests passes. Now, is it ok to commit it to trunk and wait for a test suite to cycle to see if other compilers accept it ? If not what is the proper protocol to test patches like this ?

Testing locally on a couple of compilers and committing to the trunk to see if anything else breaks is fine.

Note: See TracTickets for help on using tickets.