|
Boost : |
Subject: Re: [boost] [type_traits] is_list_constructible regression failures
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2018-03-12 19:30:09
Hello,
On Mon, Mar 12, 2018 at 12:16 PM, John Maddock via Boost
<boost_at_[hidden]> wrote:
> On 12/03/2018 19:07, Lorenzo Caminiti via Boost wrote:
>> I noticed the following failure in Boost.TypeTraits regression tests
>> on GCC 4.6 C++11. Any idea why this is failing?>
>
> There's something different about that tester - there are several gcc-4.6
> test runners in the matrix and they're all passing
> is_list_constructible_test bar that one. What/why the difference is there I
> have no idea :(
I don't think the error is limited to that tester.
I get the same Boost.TypeTraits error in 2 Boost.Contract tests on
that compiler/plaform. All these tests do is to #include
<boost/type_traits.hpp>. For example, for one of them:
Test output: igaztanaga-master-gcc-4.6c++11 - contract - old-auto / gcc-4.6c+
Rev cb62bbf20f4a0000ee6f16835b0c2dc92edea8cd / Sun, 11 Mar 2018 03:16:04 +0000
Compile [2018-03-11 09:51:14 UTC]: fail
"C:/Programs/mingw-builds/x32-4.6.4-posix-dwarf-rev0/mingw32/bin/gcc-4.6.bat"
-pipe -fmax-errors=1 -std=c++0x -m32 -O0 -fno-inline -Wall
-march=i686 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTRACT_DISABLE_THREADS
-DBOOST_CONTRACT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK=1 -I".."
-I"..\libs\contract\test\old" -c -o
"c:\boost\master\results\boost\bin.v2\libs\contract\test\old-auto.test\gcc-4.6c+\dbg\dbg-symbl-off\old\auto.o"
"..\libs\contract\test\old\auto.cpp"
In file included from ../boost/type_traits.hpp:110:0,
from ..\libs\contract\test\old\auto.cpp:11:
../boost/type_traits/is_list_constructible.hpp:36:61: error: expected
class-name before 'decltype'
compilation terminated due to -fmax-errors=1.
Where auto.cpp (note auto.cpp:11 is the #include <boost/type_traits.hpp> line):
// Copyright (C) 2008-2018 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0 (see accompanying
// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
// Test that OLD macro allows to use C++11 auto declarations.
#include <boost/config.hpp>
#include <boost/contract/old.hpp>
#include <boost/type_traits.hpp> // ** line 11 **
#include <boost/static_assert.hpp>
#include <boost/detail/lightweight_test.hpp>
int main() {
int x = -123;
auto old_x = BOOST_CONTRACT_OLDOF(x);
x = 123;
BOOST_STATIC_ASSERT((boost::is_same<decltype(old_x),
boost::contract::old_ptr<int> >::value));
#ifndef BOOST_CONTRACT_NO_OLDS
BOOST_TEST_EQ(*old_x, -123);
#endif
BOOST_TEST_EQ(x, 123);
boost::contract::virtual_* v = 0;
char y = 'j';
auto old_y = BOOST_CONTRACT_OLDOF(v, y);
y = 'k';
BOOST_STATIC_ASSERT((boost::is_same<decltype(old_y),
boost::contract::old_ptr<char> >::value));
#ifndef BOOST_CONTRACT_NO_OLDS
BOOST_TEST_EQ(*old_y, 'j');
#endif
BOOST_TEST_EQ(y, 'k');
return boost::report_errors();
}
Thanks,
--Lorenzo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk