Compile error: class template argument deduction failed
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Ubuntu 18.04
- Arch: x86_64
- Way to build: ./build.sh
- Version: release v2023.06.26.00
- Compiler: gcc-11, g++-11
## Build logs
Compile error as per the readme build. The logs are as follows.
```
[286/736] Building CXX object CMakeFiles/f14_map_test.dir/folly/container/test/F14MapTest.cpp.o
FAILED: CMakeFiles/f14_map_test.dir/folly/container/test/F14MapTest.cpp.o
/usr/bin/ccache /usr/bin/g++-11 -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_NO_LIB -DFMT_LOCALE -DFOLLY_XLOG_STRIP_PREFIXES=\"/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git:/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/build/folly\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git -I. -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/double-conversion-v2P0RdSpquR6fgwXiVwHJuKHCb3p1eU_6G4Udsj7KGo/include -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/glog-i6Qq8Ngww05fipGpxqslROkAj25Nv-n8rQ-KZP50-po/include -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/libevent-olKxd9vstqwnRm9rEErXw9Hn7UVLkieMKiMQSI5x4oo/include -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/xz-927AAZbfhhKrxsYj3-LSDSbm4-1MEPf6Ml9gLh2uGd0/include -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/lz4-q2ffyqYSpGjJWOVXlopH63XfvP6qBQpTaXnhJycFhzE/include -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/zstd-t-fdw3hlGdozX3Tdq3g1HvbuLa6uV2zPn3lJSHkcIMs/include -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/snappy-ZyfjGt_Qb3iIFWFhp4qGR613LC88Xo8lbIcrFNpICc0/include -I/usr/include/libdwarf -I/usr/include/libiberty -I/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/libsodium-BKwgV_NUn-W5kq3quTvb1WwyEYpQq9Qjya76pAN-ujQ/include -isystem /tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/googletest-YpAwLwjzLCxb7EWZeuMbC3XxM67rtf4t7of9R8b0dR0/include -isystem /tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/boost-hqFvdxx7ZBk4z1du3LURui7pCaHgLHhu7W3gcLcUkps/include -isystem /tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/gflags-wvL5Gcy54I5UqTZEBr3lk4gjMg6v0-lkSvogAqADX8U/include -isystem /tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/installed/fmt-wB-c-tAbV0WsPHgnoWKdckvhlUMBle_6X_oLbgPdDm0/include -O2 -g -DNDEBUG -fcoroutines -g -std=gnu++1z -finput-charset=UTF-8 -fsigned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wuninitialized -Wunused-label -Wunused-result -Wshadow-compatible-local -Wno-noexcept-type -faligned-new -fopenmp -pthread -std=gnu++17 -MD -MT CMakeFiles/f14_map_test.dir/folly/container/test/F14MapTest.cpp.o -MF CMakeFiles/f14_map_test.dir/folly/container/test/F14MapTest.cpp.o.d -o CMakeFiles/f14_map_test.dir/folly/container/test/F14MapTest.cpp.o -c /tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp: In instantiation of ‘void testInitializerListDeductionGuide() [with TMap = folly::F14ValueMap]’:
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp:2355:49: required from here
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp:2305:8: error: class template argument deduction failed:
2305 | TMap dest1{std::pair{1, 2.0}, {3, 4.0}};
| ^~~~~
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp:2305:8: error: no matching function for call to ‘F14ValueMap(std::pair, )’
In file included from /tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp:17:
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/F14Map.h:932:3: note: candidate: ‘template F14ValueMap()-> folly::F14ValueMap’
932 | F14ValueMap() = default;
| ^~~~~~~~~~~
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/F14Map.h:932:3: note: template argument deduction/substitution failed:
/tmp/fbcode_builder_getdeps-Zsdb_newZgitProjectZfollyZbuildZfbcode_builder/repos/github.com-facebook-folly.git/folly/container/test/F14MapTest.cpp:2305:8: note: candidate expects 0 arguments, 2 provided
2305 | TMap dest1{std::pair{1, 2.0}, {3, 4.0}};
| ^~~~~
```
Contributor guide
Assessment
This issue has not been assessed yet.