Re: [Boost-bugs] [Boost C++ Libraries] #2294: Please improve test annotation

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2294: Please improve test annotation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-09-08 14:43:33

#2294: Please improve test annotation
  Reporter: dave | Owner: fcacciola
      Type: Bugs | Status: new
 Milestone: Boost 1.37.0 | Component: optional
   Version: Boost 1.35.0 | Severity: Problem
Resolution: | Keywords:

Comment(by dave):

 Suggested new text:

    This failure is caused by a compiler bug, and as far as we can tell,
 can't be
    worked around in the library, although we think the library might be
    safer with respect to this bug.

    Specifics: the following simple test fails when it should succeed.
  #include <cassert>

 int const x = 0;
 struct A
    A(int const& y)
        assert(&x == &y);

 int main()
    A a(x); // direct initialization works fine
    A b = x; // copy initialization causes x to be copied before it is

    The possible safety enhancement would be to cause the constructor in
    to be explicit for optional<T const&>; that would prevent copy

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC