Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
a6e8ed15
Commit
a6e8ed15
authored
May 11, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable UDL templates on GCC 9 by default (#1148)
parent
de5da509
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
include/fmt/format.h
include/fmt/format.h
+16
-13
No files found.
include/fmt/format.h
View file @
a6e8ed15
...
@@ -148,15 +148,18 @@ FMT_END_NAMESPACE
...
@@ -148,15 +148,18 @@ FMT_END_NAMESPACE
# endif
# endif
#endif
#endif
// EDG C++ Front End based compilers (icc, nvcc) do not currently support UDL
#ifndef FMT_USE_UDL_TEMPLATE
// templates.
// EDG front end based compilers (icc, nvcc) do not support UDL templates yet
#if FMT_USE_USER_DEFINED_LITERALS && FMT_ICC_VERSION == 0 && \
// and GCC 9 warns about them.
FMT_CUDA_VERSION == 0 && \
# if FMT_USE_USER_DEFINED_LITERALS && FMT_ICC_VERSION == 0 && \
((FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L) || \
FMT_CUDA_VERSION == 0 && \
(defined(FMT_CLANG_VERSION) && FMT_CLANG_VERSION >= 304))
((FMT_GCC_VERSION >= 600 && FMT_GCC_VERSION <= 900 && \
# define FMT_UDL_TEMPLATE 1
__cplusplus >= 201402L) || \
#else
(defined(FMT_CLANG_VERSION) && FMT_CLANG_VERSION >= 304))
# define FMT_UDL_TEMPLATE 0
# define FMT_USE_UDL_TEMPLATE 1
# else
# define FMT_USE_UDL_TEMPLATE 0
# endif
#endif
#endif
#if FMT_HAS_GXX_CXX11 || FMT_HAS_FEATURE(cxx_trailing_return) || \
#if FMT_HAS_GXX_CXX11 || FMT_HAS_FEATURE(cxx_trailing_return) || \
...
@@ -3570,7 +3573,7 @@ inline std::size_t formatted_size(string_view format_str, const Args&... args) {
...
@@ -3570,7 +3573,7 @@ inline std::size_t formatted_size(string_view format_str, const Args&... args) {
#if FMT_USE_USER_DEFINED_LITERALS
#if FMT_USE_USER_DEFINED_LITERALS
namespace
internal
{
namespace
internal
{
# if FMT_UDL_TEMPLATE
# if FMT_U
SE_U
DL_TEMPLATE
template
<
typename
Char
,
Char
...
CHARS
>
class
udl_formatter
{
template
<
typename
Char
,
Char
...
CHARS
>
class
udl_formatter
{
public:
public:
template
<
typename
...
Args
>
template
<
typename
...
Args
>
...
@@ -3593,7 +3596,7 @@ template <typename Char> struct udl_formatter {
...
@@ -3593,7 +3596,7 @@ template <typename Char> struct udl_formatter {
return
format
(
str
,
std
::
forward
<
Args
>
(
args
)...);
return
format
(
str
,
std
::
forward
<
Args
>
(
args
)...);
}
}
};
};
# endif // FMT_UDL_TEMPLATE
# endif // FMT_U
SE_U
DL_TEMPLATE
template
<
typename
Char
>
struct
udl_arg
{
template
<
typename
Char
>
struct
udl_arg
{
const
Char
*
str
;
const
Char
*
str
;
...
@@ -3606,7 +3609,7 @@ template <typename Char> struct udl_arg {
...
@@ -3606,7 +3609,7 @@ template <typename Char> struct udl_arg {
}
// namespace internal
}
// namespace internal
inline
namespace
literals
{
inline
namespace
literals
{
# if FMT_UDL_TEMPLATE
# if FMT_U
SE_U
DL_TEMPLATE
template
<
typename
Char
,
Char
...
CHARS
>
template
<
typename
Char
,
Char
...
CHARS
>
FMT_CONSTEXPR
internal
::
udl_formatter
<
Char
,
CHARS
...
>
operator
""
_format
()
{
FMT_CONSTEXPR
internal
::
udl_formatter
<
Char
,
CHARS
...
>
operator
""
_format
()
{
return
{};
return
{};
...
@@ -3630,7 +3633,7 @@ inline internal::udl_formatter<wchar_t> operator"" _format(const wchar_t* s,
...
@@ -3630,7 +3633,7 @@ inline internal::udl_formatter<wchar_t> operator"" _format(const wchar_t* s,
std
::
size_t
)
{
std
::
size_t
)
{
return
{
s
};
return
{
s
};
}
}
# endif // FMT_UDL_TEMPLATE
# endif // FMT_U
SE_U
DL_TEMPLATE
/**
/**
\rst
\rst
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment