Boost logo

Boost :

Subject: Re: [boost] [contract] _NOEXCEPT errors in <ostream> for Clang 5.0 C++1z on Teeks Linux
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2017-11-15 22:42:20


On Sun, Nov 12, 2017 at 4:27 PM, Lorenzo Caminiti via Boost <
boost_at_[hidden]> wrote:

> Hello all,
>
> Most of Boost.Contract regression test fail for toolset
> clang-gnu-linux-5.0~c++1z~lc on platform
> teeks99-02-dc5-1z-lc-Docker-64on64 because of the following error on
> #include <ostream> done by Boost.Range (and sometimes by
> Boost.IOStreams):
>
> "clang++-5.0" -c -x c++ -Wno-c99-extensions -std=c++1z
> -stdlib=libc++ -isystem/usr/include/libcxxabi -O0 -g -fno-inline -Wall
> -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTRACT_DISABLE_THREADS
> -DBOOST_CONTRACT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK=1 -I".."
> -I"../libs/contract/test/function" -o
> "/var/boost/run/results/boost/bin.v2/libs/contract/test/
> function-smoke.test/clang-gnu-linux-5.0~c++1z~lc/debug/
> threadapi-pthread/function/smoke.o"
> "../libs/contract/test/function/smoke.cpp"
>
> In file included from ../libs/contract/test/function/smoke.cpp:9:
> In file included from
> ../libs/contract/test/function/../detail/oteststream.hpp:10:
> In file included from ../boost/iostreams/tee.hpp:18:
> In file included from ../boost/iostreams/detail/
> adapter/device_adapter.hpp:22:
> In file included from ../boost/iostreams/detail/call_traits.hpp:15:
> In file included from ../boost/iostreams/traits.hpp:38:
> In file included from ../boost/range/iterator_range.hpp:14:
> In file included from ../boost/range/iterator_range_io.hpp:32:
> In file included from /usr/include/c++/v1/ostream:138:
> In file included from /usr/include/c++/v1/ios:216:
> In file included from /usr/include/c++/v1/__locale:15:
> /usr/include/c++/v1/string:1942:14: error: expected ';' at end of
> declaration
> _NOEXCEPT
> ^
> /usr/include/c++/v1/string:1947:9: error: expected unqualified-id
> _NOEXCEPT
> ^
> /usr/include/c++/v1/__config:368:21: note: expanded from macro '_NOEXCEPT'
> # define _NOEXCEPT noexcept
> ^
> 2 errors generated.
>
>
I think I need more context for this.
Looking at the 5.0 libc++ sources, I see this:

1490: template <class _CharT, class _Traits, class _Allocator>
1491: inline _LIBCPP_INLINE_VISIBILITY
1492: basic_string<_CharT, _Traits, _Allocator>::basic_string()
1493:
 _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
1494: {
1495: #if _LIBCPP_DEBUG_LEVEL >= 2
1496: __get_db()->__insert_c(this);
1497: #endif
1498: __zero();
1499: }
1500:
1501: template <class _CharT, class _Traits, class _Allocator>
1502: inline _LIBCPP_INLINE_VISIBILITY
1503: basic_string<_CharT, _Traits, _Allocator>::basic_string(const
allocator_type& __a)
1504: #if _LIBCPP_STD_VER <= 14
1505:
 _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
1506: #else
1507: _NOEXCEPT
1508: #endif

Which doesn't match what you're reporting.

-- Marshall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk