-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compilation fails with Intel oneAPI 2021.1 #2105
Comments
Could you submit a PR to exclude this compiler in Lines 154 to 158 in 7fd535c
|
I tried to exclude the compiler simply by doing: #ifndef FMT_USE_UDL_TEMPLATE
// EDG frontend based compilers (icc, nvcc, PGI, etc) and GCC < 6.4 do not
// properly support UDL templates and GCC >= 9 warns about them.
# if FMT_USE_USER_DEFINED_LITERALS && \
(!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 501) && \
((FMT_GCC_VERSION >= 604 && __cplusplus >= 201402L) || \
FMT_CLANG_VERSION >= 304) && !(FMT_ICC_VERSION == 2021) && \
!defined(__PGI) && !defined(__NVCC__)
# define FMT_USE_UDL_TEMPLATE 1
# else
# define FMT_USE_UDL_TEMPLATE 0
# endif
#endif but this does not resolve the issue, another error happened at another place: /test/git/fmt/include/fmt/format.h(3849): error: no instance of overloaded function "fmt::v7::detail::write" matches the argument list
argument types are: (std::__1::back_insert_iterator<std::__1::string>, const fmt_test::ABC)
detail::write<char>(std::back_inserter(result), value);
^
/test/git/fmt/include/fmt/format.h(2167): note: this candidate was rejected because there is a type mismatch after argument substitution
auto write(OutputIt out, const T& value) -> typename std::enable_if<
^
/test/git/fmt/include/fmt/format.h(2162): note: this candidate was rejected because arguments do not match
OutputIt write(OutputIt out, const void* value) {
^
/test/git/fmt/include/fmt/format.h(2151): note: this candidate was rejected because arguments do not match
FMT_CONSTEXPR OutputIt write(OutputIt out, const Char* value) {
^
/test/git/fmt/include/fmt/format.h(2144): note: this candidate was rejected because arguments do not match
FMT_CONSTEXPR OutputIt write(OutputIt out, Char value) {
^
/test/git/fmt/include/fmt/format.h(2139): note: this candidate was rejected because arguments do not match
constexpr OutputIt write(OutputIt out, bool value) {
^
/test/git/fmt/include/fmt/format.h(2133): note: this candidate was rejected because at least one template argument could not be deduced
FMT_CONSTEXPR OutputIt write(OutputIt out, T value) {
^
/test/git/fmt/include/fmt/format.h(2107): note: this candidate was rejected because at least one template argument could not be deduced
FMT_CONSTEXPR OutputIt write(OutputIt out, T value) {
^
/test/git/fmt/include/fmt/format.h(2097): note: this candidate was rejected because arguments do not match
FMT_CONSTEXPR OutputIt write(OutputIt out, basic_string_view<Char> value) {
^
/test/git/fmt/include/fmt/format.h(2090): note: this candidate was rejected because arguments do not match
OutputIt write(OutputIt out, string_view value) {
^
/test/git/fmt/include/fmt/format.h(2083): note: this candidate was rejected because arguments do not match
OutputIt write(OutputIt out, monostate) {
^
/test/git/fmt/include/fmt/format.h(2059): note: this candidate was rejected because at least one template argument could not be deduced
inline OutputIt write(OutputIt out, T value) {
^
/test/git/fmt/include/fmt/format.h(2033): note: this candidate was rejected because at least one template argument could not be deduced
OutputIt write(OutputIt out, T value) {
^
/test/git/fmt/include/fmt/format.h(1985): note: this candidate was rejected because at least one template argument could not be deduced
OutputIt write(OutputIt out, T value, basic_format_specs<Char> specs,
^
/test/git/fmt/include/fmt/format.h(1646): note: this candidate was rejected because at least one template argument could not be deduced
FMT_CONSTEXPR OutputIt write(OutputIt out, basic_string_view<StrChar> s,
^
detected during instantiation of "std::__1::string fmt::v7::to_string(const T &) [with T=fmt_test::ABC, <unnamed>=0]" at line 330 of "//test/git/fmt/test/ostream-test.cc" |
There might be an incompatibility or issue with this Intel compiler on macOS. I would try this on Linux to make sure. |
The same error is happening on
>> cmake .. -DCMAKE_CXX_COMPILER=icpc -DCMAKE_CXX_STANDARD=11
>> make
/root/fmt/include/fmt/format.h(3849): error: no instance of overloaded function "fmt::v7::detail::write" matches the argument list
argument types are: (std::back_insert_iterator<std::__cxx11::string>, const adl_test::fmt::detail::foo)
detail::write<char>(std::back_inserter(result), value);
^
/root/fmt/include/fmt/format.h(2167): note: this candidate was rejected because there is a type mismatch after argument substitution
auto write(OutputIt out, const T& value) -> typename std::enable_if<
^
/root/fmt/include/fmt/format.h(2162): note: this candidate was rejected because arguments do not match
OutputIt write(OutputIt out, const void* value) {
^
/root/fmt/include/fmt/format.h(2151): note: this candidate was rejected because arguments do not match
FMT_CONSTEXPR OutputIt write(OutputIt out, const Char* value) {
^
/root/fmt/include/fmt/format.h(2144): note: this candidate was rejected because arguments do not match
FMT_CONSTEXPR OutputIt write(OutputIt out, Char value) {
^
/root/fmt/include/fmt/format.h(2139): note: this candidate was rejected because arguments do not match
constexpr OutputIt write(OutputIt out, bool value) {
^
/root/fmt/include/fmt/format.h(2133): note: this candidate was rejected because at least one template argument could not be deduced
FMT_CONSTEXPR OutputIt write(OutputIt out, T value) {
^
/root/fmt/include/fmt/format.h(2107): note: this candidate was rejected because at least one template argument could not be deduced
FMT_CONSTEXPR OutputIt write(OutputIt out, T value) {
^
/root/fmt/include/fmt/format.h(2097): note: this candidate was rejected because arguments do not match
FMT_CONSTEXPR OutputIt write(OutputIt out, basic_string_view<Char> value) {
^
/root/fmt/include/fmt/format.h(2090): note: this candidate was rejected because arguments do not match
OutputIt write(OutputIt out, string_view value) {
^
/root/fmt/include/fmt/format.h(2083): note: this candidate was rejected because arguments do not match
OutputIt write(OutputIt out, monostate) {
^
/root/fmt/include/fmt/format.h(2059): note: this candidate was rejected because at least one template argument could not be deduced
inline OutputIt write(OutputIt out, T value) {
^
/root/fmt/include/fmt/format.h(2033): note: this candidate was rejected because at least one template argument could not be deduced
OutputIt write(OutputIt out, T value) {
^
/root/fmt/include/fmt/format.h(1985): note: this candidate was rejected because mismatch in count of arguments
OutputIt write(OutputIt out, T value, basic_format_specs<Char> specs,
^
/root/fmt/include/fmt/format.h(1646): note: this candidate was rejected because mismatch in count of arguments
FMT_CONSTEXPR OutputIt write(OutputIt out, basic_string_view<StrChar> s,
^
detected during instantiation of "std::__cxx11::string fmt::v7::to_string(const T &) [with T=adl_test::fmt::detail::foo, <unnamed>=0]" at line 1994 of "/root/fmt/test/format-test.cc" |
Looks like a bug in icpc. It should have matched this overload:
which is Lines 2190 to 2194 in 2a25e2b
A PR with a workaround will be welcome if you manage to find one (e.g. disable ostream tests). In the meantime you might be able to use {fmt} without ostream support which is not essential anyway. |
The UDL issue should be fixed in 417e1ce. As for the overload resolution issue, it looks like a bug in icpc, I recommend reporting there. |
If compiling with the Intel oneAPI 2021.1 Beta 20201112, compilation fails:
with
-DCMAKE_CXX_STANDARD=11
A similar issue #742 has been reported and resolved before (with a fix fba352a)
with
-DCMAKE_CXX_STANDARD=14
with
-DCMAKE_CXX_STANDARD=17
with
-DCMAKE_CXX_STANDARD=20
Host info:
>> sw_vers ProductName: macOS ProductVersion: 11.1 BuildVersion: 20C69
Compiler info:
>> icpc --version icpc (ICC) 2021.1 Beta 20201112 Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
The text was updated successfully, but these errors were encountered: