Skip to content
Commit a124e3b4 authored by Stephan Bergmann's avatar Stephan Bergmann
Browse files

Blind fix attempt for older macOS builds

...like <https://ci.libreoffice.org/job/gerrit_mac/40711/> (which builds with
MacOSX10.13.sdk, but not sure with what Clang and libc++ versions):

> In file included from xml_map_tree.cpp:8:
> In file included from ./xml_map_tree.hpp:11:
> In file included from ../../include/orcus/pstring.hpp:14:
> In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:470:
> In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:169:
> In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
> In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
> In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:653:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:227:10: error: static_assert failed "Attempted to construct a reference element in a tuple with an rvalue"
>         {static_assert(__can_bind_reference<_Tp>(),
>          ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:385:13: note: in instantiation of function template specialization 'std::__1::__tuple_leaf<2, const orcus::pstring &, false>::__tuple_leaf<orcus::pstring, void>' requested here
>             __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
>             ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:738:15: note: in instantiation of function template specialization 'std::__1::__tuple_impl<std::__1::__tuple_indices<0, 1, 2, 3, 4>, orcus::xml_map_tree &, const char *, const orcus::pstring &, orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type>::__tuple_impl<0, 1, 2, 3, 4, orcus::xml_map_tree &, const char *, const orcus::pstring &, orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type, orcus::xml_map_tree &, const char *&, orcus::pstring, orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type>' requested here
>             : __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
>               ^
> xml_map_tree.cpp:216:13: note: in instantiation of function template specialization 'std::__1::tuple<orcus::xml_map_tree &, const char *, const orcus::pstring &, orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type>::tuple<orcus::xml_map_tree &, const char *&, orcus::pstring, orcus::xml_map_tree::element_type, orcus::xml_map_tree::reference_type, false, false>' requested here
>             element::args_type(
>             ^
> 1 error generated.
> Makefile:1804: recipe for target 'liborcus_0.15_la-xml_map_tree.lo' failed
> make[5]: *** [liborcus_0.15_la-xml_map_tree.lo] Error 1

(while building orcus as part of LibreOffice).

(Using "nm" instead of a more descriptive variable name "name" to avoid
-Wshadow warnings like

> xml_map_tree.cpp: In member function ‘orcus::xml_map_tree::element* orcus::xml_map_tree::element::get_or_create_child(orcus::xml_map_tree&, orcus::xmlns_id_t, const orcus::pstring&)’:
> xml_map_tree.cpp:214:16: warning: declaration of ‘name’ shadows a member of ‘orcus::xml_map_tree::element’ [-Wshadow]
>   214 |     auto const name = sp.intern(_name.get(), _name.size()).first;
>       |                ^~~~
> In file included from xml_map_tree.cpp:8:
> xml_map_tree.hpp:126:17: note: shadowed declaration is here
>   126 |         pstring name;
>       |                 ^~~~

)
parent aa3a5fa6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment