Re: [Boost-bugs] [Boost C++ Libraries] #2548: Let's fix the logical constness of value_initialized!

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2548: Let's fix the logical constness of value_initialized!
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-01 09:10:38


#2548: Let's fix the logical constness of value_initialized!
--------------------------+-------------------------------------------------
 Reporter: niels_dekker | Owner: niels_dekker
     Type: Bugs | Status: assigned
Milestone: Boost 1.38.0 | Component: utility
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------

Comment(by niels_dekker):

 So I marked the Intel 9 failure: changeset [54560]

 Unfortunately the number of Intel 9 compile errors is not reduced by the
 workaround I added with changeset [54502]. Instead, it has gone up from 2
 to 33! Before committing the workaround, Intel 9 apparently only failed to
 convert from value_initialized<T> to T when T was a pointer. While the
 workaround disables conversion from any ''const'' value_initialized<T>,
 for Intel 9. But it does enable conversion from any non-const
 value_initialized<T>, including when T is a pointer. So there's clearly a
 trade-off here.

 [http://www.boost.org/development/tests/trunk/developer/output/Sandia-
 intel-9-0-boost-bin-v2-libs-utility-test-value_init_test-test-intel-
 linux-9-0-debug.html Sandia-intel-9-0-boost-bin-v2-libs-utility-test-
 value_init_test-test-intel-linux-9-0-debug.html] now reports:

  Test output: Sandia-intel-9.0 - utility - value_init_test / intel-
 linux-9.0
 Rev 54533 / Tue, 30 Jun 2009 10:33:23 +0000
 Report Time: Tue, 30 Jun 2009 20:15:05 +0000

 Compile [2009-06-30 12:11:26 UTC]: fail

     "/usr/local/intel/cc/9.0-032/bin/icpc" -c -xc++ -O0 -g -w1 -Ob0 -fPIC
 -DBOOST_ALL_NO_LIB=1 -I".." -c -o
 "/var/scratch/boost/results/boost/bin.v2/libs/utility/test/value_init_test.test
 /intel-linux-9.0/debug/value_init_test.o"
 "../libs/utility/test/../value_init_test.cpp"

 ../libs/utility/test/../value_init_test.cpp(261): error: no operator "=="
 matches these operands
             operand types are: const int == const
 boost::value_initialized<int>
     BOOST_CHECK ( y == x_c ) ;
     ^
           detected during instantiation of "bool test(const T &, const T
 &) [with T=int]"

 ../libs/utility/test/../value_init_test.cpp(265): error: no operator "=="
 matches these operands
             operand types are: const boost::value_initialized<int> ==
 const int
     BOOST_CHECK ( x_c == z ) ;
     ^
           detected during instantiation of "bool test(const T &, const T
 &) [with T=int]"

    ''[ snip ]''

 ../libs/utility/test/../value_init_test.cpp(283): error: no operator "=="
 matches these operands
             operand types are: const AggregatePODStructWrapper == const
 boost::value_initialized<const AggregatePODStructWrapper>
     BOOST_CHECK ( y == cx_c ) ;
     ^
           detected during instantiation of "bool test(const T &, const T
 &) [with T=AggregatePODStructWrapper]"

 compilation aborted for ../libs/utility/test/../value_init_test.cpp (code
 2)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2548#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC