The rhub2 workflow is useful for the test.
Merge this and run the workflow with this option (clang18):
(If you want to work on another branch, change the target branch from master as well)
Then I got this:
Details
```log
── R CMD build ─────────────────────────────────────────────────────────────────
* checking for file ‘.../DESCRIPTION’ ... OK
* preparing ‘httpgd’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* running ‘cleanup’
* installing the package to build vignettes
-----------------------------------
* installing *source* package ‘httpgd’ ...
** using staged installation
** libs
using C++ compiler: ‘Ubuntu clang version 18.1.0 (++20240307093122+461274b81d86-1~exp1~20240307213239.65)’
using C++14
rm -f httpgd.so cpp11.o httpgd.o httpgd_rng.o httpgd_webserver.o unigd_impl.o
clang++-18 -stdlib=libc++ -std=gnu++14 -I"/opt/R/devel/lib/R/include" -DNDEBUG -Ilib -DFMT_HEADER_ONLY -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/AsioHeaders/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/unigd/include' -I/usr/local/include -fpic -O3 -Wall -pedantic -frtti -Wp,-D_FORTIFY_SOURCE=3 -Wall -pedantic -fdiagnostics-color=always -c cpp11.cpp -o cpp11.o
clang++-18 -stdlib=libc++ -std=gnu++14 -I"/opt/R/devel/lib/R/include" -DNDEBUG -Ilib -DFMT_HEADER_ONLY -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/AsioHeaders/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/unigd/include' -I/usr/local/include -fpic -O3 -Wall -pedantic -frtti -Wp,-D_FORTIFY_SOURCE=3 -Wall -pedantic -fdiagnostics-color=always -c httpgd.cpp -o httpgd.o
In file included from httpgd.cpp:7:
In file included from /github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include/cpp11/logicals.hpp:11:
In file included from /github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include/cpp11/r_bool.hpp:4:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/ostream:189:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/format:195:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/__format/container_adaptor.h:24:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/queue:272:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/deque:2602:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/functional:526:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/__functional/boyer_moore_searcher.h:26:
/usr/lib/llvm-18/bin/../include/c++/v1/unordered_map:882:13: error: no viable overloaded '='
882 | __ref() = std::forward<_ValueTp>(__v);
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-18/bin/../include/c++/v1/__hash_table:1211:44: note: in instantiation of function template specialization 'std::__hash_value_type::operator= &, void>' requested here
1211 | __cache->__upcast()->__get_value() = *__first;
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/unordered_map:1722:12: note: in instantiation of function template specialization 'std::__hash_table, std::__unordered_map_hasher, std::hash, std::equal_to>, std::__unordered_map_equal, std::equal_to, std::hash>, std::allocator>>::__assign_unique *>' requested here
1722 | __table_.__assign_unique(__il.begin(), __il.end());
| ^
lib/crow/json.h:1662:26: note: in instantiation of member function 'std::unordered_map::operator=' requested here
1662 | (*o) = initializer_list;
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:289:3: note: candidate function not viable: no known conversion from 'const std::pair' to 'const __conditional_t::value && is_copy_assignable::value, pair, __nat>' (aka 'const std::__nat') for 1st argument
289 | operator=(__conditional_t< is_copy_assignable::value && is_copy_assignable::value,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290 | pair,
| ~~~~~
291 | __nat> const& __p)
| ~~~~~~~~~~~~~~~~~
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:298:61: note: candidate function not viable: no known conversion from 'const std::pair' to '__conditional_t::value && is_move_assignable::value, pair, __nat>' (aka 'std::__nat') for 1st argument
298 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(
| ^
299 | __conditional_t< is_move_assignable::value && is_move_assignable::value, pair, __nat>&&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300 | __p)
| ~~~
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:311:61: note: candidate template ignored: requirement 'is_assignable::value' was not satisfied [with _U1 = const std::string, _U2 = crow::json::wvalue]
311 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(pair<_U1, _U2> const& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:321:61: note: candidate template ignored: deduced type 'pair<...>' of 1st parameter does not match adjusted type 'const pair<...>' of argument [with _U1 = const std::string, _U2 = crow::json::wvalue, $2 = nullptr]
321 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(pair<_U1, _U2>&& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:422:61: note: candidate template ignored: could not match 'tuple' against 'pair'
422 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(tuple<_U1, _U2> const& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:431:61: note: candidate template ignored: could not match 'tuple' against 'pair'
431 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(tuple<_U1, _U2>&& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:463:61: note: candidate template ignored: could not match 'array' against 'pair'
463 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(array<_Up, 2> const& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:470:61: note: candidate template ignored: could not match 'array' against 'pair'
470 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(array<_Up, 2>&& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:80:29: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'const pair' to 'const pair' for 1st argument
80 | struct _LIBCPP_TEMPLATE_VIS pair
| ^~~~
In file included from httpgd.cpp:7:
In file included from /github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include/cpp11/logicals.hpp:11:
In file included from /github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include/cpp11/r_bool.hpp:4:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/ostream:189:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/format:195:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/__format/container_adaptor.h:24:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/queue:272:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/deque:2602:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/functional:526:
In file included from /usr/lib/llvm-18/bin/../include/c++/v1/__functional/boyer_moore_searcher.h:26:
/usr/lib/llvm-18/bin/../include/c++/v1/unordered_map:871:13: error: no viable overloaded '='
871 | __ref() = __v.__get_value();
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
/usr/lib/llvm-18/bin/../include/c++/v1/__hash_table:1243:44: note: in instantiation of member function 'std::__hash_value_type::operator=' requested here
1243 | __cache->__upcast()->__get_value() = *__first;
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__hash_table:1100:5: note: in instantiation of function template specialization 'std::__hash_table, std::__unordered_map_hasher, std::hash, std::equal_to>, std::__unordered_map_equal, std::equal_to, std::hash>, std::allocator>>::__assign_multi, void *> *>>' requested here
1100 | __assign_multi(__u.begin(), __u.end());
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/unordered_map:1187:14: note: in instantiation of member function 'std::__hash_table, std::__unordered_map_hasher, std::hash, std::equal_to>, std::__unordered_map_equal, std::equal_to, std::hash>, std::allocator>>::operator=' requested here
1187 | __table_ = __u.__table_;
| ^
lib/crow/json.h:1681:26: note: in instantiation of member function 'std::unordered_map::operator=' requested here
1681 | (*o) = value;
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:289:3: note: candidate function not viable: no known conversion from 'const value_type' (aka 'const pair') to 'const __conditional_t::value && is_copy_assignable::value, pair, __nat>' (aka 'const std::__nat') for 1st argument
289 | operator=(__conditional_t< is_copy_assignable::value && is_copy_assignable::value,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290 | pair,
| ~~~~~
291 | __nat> const& __p)
| ~~~~~~~~~~~~~~~~~
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:298:61: note: candidate function not viable: no known conversion from 'const value_type' (aka 'const pair') to '__conditional_t::value && is_move_assignable::value, pair, __nat>' (aka 'std::__nat') for 1st argument
298 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(
| ^
299 | __conditional_t< is_move_assignable::value && is_move_assignable::value, pair, __nat>&&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300 | __p)
| ~~~
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:311:61: note: candidate template ignored: requirement 'is_assignable::value' was not satisfied [with _U1 = const std::string, _U2 = crow::json::wvalue]
311 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(pair<_U1, _U2> const& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:321:61: note: candidate template ignored: deduced type 'pair<...>' of 1st parameter does not match adjusted type 'const pair<...>' of argument [with _U1 = const std::string, _U2 = crow::json::wvalue, $2 = nullptr]
321 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair& operator=(pair<_U1, _U2>&& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:422:61: note: candidate template ignored: could not match 'tuple' against 'pair'
422 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(tuple<_U1, _U2> const& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:431:61: note: candidate template ignored: could not match 'tuple' against 'pair'
431 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(tuple<_U1, _U2>&& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:463:61: note: candidate template ignored: could not match 'array' against 'pair'
463 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(array<_Up, 2> const& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:470:61: note: candidate template ignored: could not match 'array' against 'pair'
470 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair& operator=(array<_Up, 2>&& __p) {
| ^
/usr/lib/llvm-18/bin/../include/c++/v1/__utility/pair.h:80:29: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'const pair' to 'const pair' for 1st argument
80 | struct _LIBCPP_TEMPLATE_VIS pair
| ^~~~
2 errors generated.
make: *** [/opt/R/devel/lib/R/etc/Makeconf:204: httpgd.o] Error 1
```
Related to #145
The
rhub2
workflow is useful for the test. Merge this and run the workflow with this option (clang18
):(If you want to work on another branch, change the target branch from
master
as well)Then I got this:
Details
```log ── R CMD build ───────────────────────────────────────────────────────────────── * checking for file ‘.../DESCRIPTION’ ... OK * preparing ‘httpgd’: * checking DESCRIPTION meta-information ... OK * cleaning src * running ‘cleanup’ * installing the package to build vignettes ----------------------------------- * installing *source* package ‘httpgd’ ... ** using staged installation ** libs using C++ compiler: ‘Ubuntu clang version 18.1.0 (++20240307093122+461274b81d86-1~exp1~20240307213239.65)’ using C++14 rm -f httpgd.so cpp11.o httpgd.o httpgd_rng.o httpgd_webserver.o unigd_impl.o clang++-18 -stdlib=libc++ -std=gnu++14 -I"/opt/R/devel/lib/R/include" -DNDEBUG -Ilib -DFMT_HEADER_ONLY -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/AsioHeaders/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/unigd/include' -I/usr/local/include -fpic -O3 -Wall -pedantic -frtti -Wp,-D_FORTIFY_SOURCE=3 -Wall -pedantic -fdiagnostics-color=always -c cpp11.cpp -o cpp11.o clang++-18 -stdlib=libc++ -std=gnu++14 -I"/opt/R/devel/lib/R/include" -DNDEBUG -Ilib -DFMT_HEADER_ONLY -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/AsioHeaders/include' -I'/github/home/R/x86_64-pc-linux-gnu-library/4.4/unigd/include' -I/usr/local/include -fpic -O3 -Wall -pedantic -frtti -Wp,-D_FORTIFY_SOURCE=3 -Wall -pedantic -fdiagnostics-color=always -c httpgd.cpp -o httpgd.o In file included from httpgd.cpp:7: In file included from /github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include/cpp11/logicals.hpp:11: In file included from /github/home/R/x86_64-pc-linux-gnu-library/4.4/cpp11/include/cpp11/r_bool.hpp:4: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/ostream:189: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/format:195: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/__format/container_adaptor.h:24: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/queue:272: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/deque:2602: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/functional:526: In file included from /usr/lib/llvm-18/bin/../include/c++/v1/__functional/boyer_moore_searcher.h:26: /usr/lib/llvm-18/bin/../include/c++/v1/unordered_map:882:13: error: no viable overloaded '=' 882 | __ref() = std::forward<_ValueTp>(__v); | ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/llvm-18/bin/../include/c++/v1/__hash_table:1211:44: note: in instantiation of function template specialization 'std::__hash_value_type