Skip to content
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 C++14 and Intel C++ 2019 beta #742

Closed
kc9jud opened this issue May 18, 2018 · 4 comments
Closed

compilation fails with C++14 and Intel C++ 2019 beta #742

kc9jud opened this issue May 18, 2018 · 4 comments

Comments

@kc9jud
Copy link

kc9jud commented May 18, 2018

If compiling with the Intel C++ 2019 beta and C++14 enabled, compilation fails:

In file included from libraries/relative/relative_me.cpp(14):
./libraries/fmt/format.h(3595): error: a literal operator template must have a template parameter list equivalent to "<char ...>"
  FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {
                                                        ^

Host info:

>> lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

Compiler info:

>> icpc --version
icpc (ICC) 19.0.0.046 20180317
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
>> g++ --version
g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@kc9jud
Copy link
Author

kc9jud commented May 19, 2018

Related to #311 and #312?

@vitaut
Copy link
Contributor

vitaut commented May 19, 2018

It looks like the Intel C++ compiler doesn't support UDL templates. Does replacing

#if FMT_USE_USER_DEFINED_LITERALS && \
    ((FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L) || \
    (defined(FMT_CLANG_VERSION) && FMT_CLANG_VERSION >= 304))

with

#if FMT_USE_USER_DEFINED_LITERALS && !defined(FMT_ICC_VERSION) && \
    ((FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L) || \
    (defined(FMT_CLANG_VERSION) && FMT_CLANG_VERSION >= 304))

in https://github.com/fmtlib/fmt/blob/master/include/fmt/format.h#L118 fixes the issue?

@vitaut
Copy link
Contributor

vitaut commented May 26, 2018

Committed a tentative fix (fba352a). However, I wasn't able to verify it since I don't have an Intel compiler at hand, so feel free to reopen if the problem persists.

@vitaut vitaut closed this as completed May 26, 2018
@kc9jud
Copy link
Author

kc9jud commented May 29, 2018

fba352a appears to have fixed it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants