Ticket #2294: boost-optional-explicit-failures-markup-issue2294.diff

File boost-optional-explicit-failures-markup-issue2294.diff, 2.7 KB (added by Dean Michael Berris, 12 years ago)

Proposed patch including the proposed text in the issue.

  • status/explicit-failures-markup.xml

     
    25472547            <toolset name="gcc-3.4.6_linux_ia64"/>
    25482548            <toolset name="gcc-4.2.*"/>
    25492549            <toolset name="gcc-4.1.2_sunos_i86pc"/>
    2550                 <note author="Fernando Cacciola" refid="2"/>
     2550                <note author="Fernando Cacciola" id="optional-compiler-bug">
     2551                <p>This failure is caused by a compiler bug, and as far as we can
     2552                tell, can't be worked around in the library, although we think
     2553                the library might be made safer with respect to this bug.</p>
     2554
     2555                <p>Specifics: the following simple test fails when it should succeed.</p>
     2556                <pre>
     2557                #include &lt;cassert&gt;
     2558
     2559                int const x = 0;
     2560                struct A
     2561                {
     2562                   A(int const&amp; y)
     2563                   {
     2564                     assert(&amp;x == &amp;y);
     2565                   }
     2566                };
     2567
     2568                int main()
     2569                {
     2570                    A a(x);  // direct initialization works fine
     2571                    A b = x; // copy initialization causes x to be copied before it is bound
     2572                }
     2573                </pre>
     2574
     2575                The possible safety enhancement would be to cause the constructor
     2576                in question to be explicit for optional&lt;T const&amp;&gt;; that
     2577                would prevent copy initialization.
     2578                </note>
    25512579        </mark-expected-failures>
    25522580        <mark-expected-failures>
    25532581            <test name="optional_test_ref_fail1"/>
    25542582            <toolset name="borland-5.6*"/>
    25552583            <toolset name="borland-5.8*"/>
    25562584            <toolset name="borland-5.9*"/>
    2557             <note author="Fernando Cacciola" refid="2"/>
     2585            <note author="Fernando Cacciola" refid="optional-compiler-bug"/>
    25582586        </mark-expected-failures>
    25592587        <mark-expected-failures>
    25602588            <test name="optional_test_fail3a"/>
    25612589            <toolset name="gcc-3_3-darwin"/>
    2562             <note author="Fernando Cacciola" refid="2"/>
     2590            <note author="Fernando Cacciola" refid="optional-compiler-bug"/>
    25632591        </mark-expected-failures>
    25642592        <mark-expected-failures>
    25652593            <test name="optional_test_inplace_fail2"/>
    25662594            <toolset name="gcc-3_3-darwin"/>
    2567             <note author="Fernando Cacciola" refid="2"/>
     2595            <note author="Fernando Cacciola" refid="optional-compiler-bug"/>
    25682596        </mark-expected-failures>
    25692597        <mark-expected-failures>
    25702598            <test name="optional_test"/>