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
3d7faaf0
Commit
3d7faaf0
authored
Dec 09, 2013
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect the availability of initialize lists.
parent
bd5fe67e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
format.h
format.h
+13
-7
No files found.
format.h
View file @
3d7faaf0
...
...
@@ -42,8 +42,8 @@
#include <string>
#include <sstream>
#if
FMT_USE_CXX11
#
include <initializer_list>
#if
def __GNUC__
#
define FMG_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
#endif
// Compatibility with compilers other than clang.
...
...
@@ -51,16 +51,22 @@
# define __has_feature(x) 0
#endif
#define FMT_USE_INITIALIZER_LIST \
(__has_feature(cxx_generalized_initializers) || \
FMG_GCC_VERSION >= 404 || _MSC_VER >= 1700)
#if FMT_USE_INITIALIZER_LIST
# include <initializer_list>
#endif
// Define FMT_USE_NOEXCEPT to make format use noexcept (C++11 feature).
#if FMT_USE_NOEXCEPT || \
(defined(__has_feature) && __has_feature(cxx_noexcept)) || \
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
#if FMT_USE_NOEXCEPT || __has_feature(cxx_noexcept) || FMG_GCC_VERSION >= 408
# define FMT_NOEXCEPT(expr) noexcept(expr)
#else
# define FMT_NOEXCEPT(expr)
#endif
#if
__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#if
FMG_GCC_VERSION >= 406
# define FMT_GCC_DIAGNOSTIC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wlong-long"
...
...
@@ -999,7 +1005,7 @@ class BasicFormatter {
BasicFormatter
(
BasicWriter
<
Char
>
&
w
,
const
Char
*
format
=
0
)
:
writer_
(
&
w
),
format_
(
format
)
{}
#if FMT_USE_
CXX11
#if FMT_USE_
INITIALIZER_LIST
// Constructs a formatter with formatting arguments.
BasicFormatter
(
BasicWriter
<
Char
>
&
w
,
const
Char
*
format
,
std
::
initializer_list
<
Arg
>
args
)
...
...
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