Boost logo

Boost :

From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2022-07-12 16:23:19


On 7/12/22 19:05, Christian Mazakas via Boost wrote:
> Seems the build is a little noisy with warnings, using gcc-12
>
>> In file included from /usr/include/c++/12/string:40,
>> from ./boost/assert/source_location.hpp:15,
>> from ./boost/exception/exception.hpp:9,
>> from ./boost/throw_exception.hpp:21,
>> from libs/filesystem/src/directory.cpp:16:
>> In static member function ‘static constexpr
> std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*,
> const char_type*, std::size_t)’,
>> inlined from ‘static constexpr void
> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const
> _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>;
> _Alloc = std::allocator<char>
>> ]’ at /usr/include/c++/12/bits/basic_string.h:423:21,
>> inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits,
> _Allocator>& std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with
> _CharT = char; _T
>> raits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at
> /usr/include/c++/12/bits/basic_string.tcc:532:22,
>> inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const
> _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
>> std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1647:19,
>> inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>& std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits =
> std::char_traits<char>; _Alloc
>> = std::allocator<char>]’ at
> /usr/include/c++/12/bits/basic_string.h:815:28,
>> inlined from ‘boost::filesystem::path&
> boost::filesystem::path::assign(const value_type*)’ at
> ./boost/filesystem/path.hpp:349:22,
>> inlined from ‘boost::system::error_code
> boost::filesystem::detail::{anonymous}::dir_itr_create(boost::intrusive_ptr<boost::filesystem::detail::dir_itr_imp>&,
> const boost::filesystem::path&, unsigned int, boost::files
>> ystem::path&, boost::filesystem::file_status&,
> boost::filesystem::file_status&)’ at
> libs/filesystem/src/directory.cpp:446:26,

It's coming from assigning a string literal to std::string, starting
from here:

https://github.com/boostorg/filesystem/blob/fcc11010a5899d6a16d3f0a9d60704f88d62eada/src/directory.cpp#L446

This is a bogus warning, please report it to gcc team.


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