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
48e6dcd0
Commit
48e6dcd0
authored
Sep 23, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement workarounds for gcc 4.4
parent
0ea3221d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
include/fmt/color.h
include/fmt/color.h
+4
-0
include/fmt/core.h
include/fmt/core.h
+14
-12
No files found.
include/fmt/color.h
View file @
48e6dcd0
...
...
@@ -266,6 +266,10 @@ template <>
inline
void
reset_color
<
wchar_t
>
(
FILE
*
stream
)
FMT_NOEXCEPT
{
fputs
(
internal
::
data
::
WRESET_COLOR
,
stream
);
}
template
<
typename
S
>
struct
is_format_string
:
std
::
integral_constant
<
bool
,
std
::
is_empty
<
format_string_traits
<
S
>>::
value
>
{};
}
// namespace internal
template
<
...
...
include/fmt/core.h
View file @
48e6dcd0
...
...
@@ -216,6 +216,14 @@ FMT_CONSTEXPR size_t length(const Char *s) {
FMT_CONSTEXPR
size_t
length
(
const
char
*
s
)
{
return
std
::
strlen
(
s
);
}
#endif
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 405
template
<
typename
...
T
>
struct
is_constructible
:
std
::
false_type
{};
#else
template
<
typename
...
T
>
struct
is_constructible
:
std
::
is_constructible
<
T
...
>
{};
#endif
template
<
typename
T
>
struct
no_formatter_error
:
std
::
false_type
{};
}
// namespace internal
...
...
@@ -644,7 +652,7 @@ inline typename std::enable_if<
template
<
typename
C
,
typename
T
,
typename
Char
=
typename
C
::
char_type
>
inline
typename
std
::
enable_if
<
std
::
is_constructible
<
basic_string_view
<
Char
>
,
T
>::
value
,
internal
::
is_constructible
<
basic_string_view
<
Char
>
,
T
>::
value
,
init
<
C
,
basic_string_view
<
Char
>
,
string_type
>>::
type
make_value
(
const
T
&
val
)
{
return
basic_string_view
<
Char
>
(
val
);
}
...
...
@@ -652,7 +660,7 @@ template <typename C, typename T, typename Char = typename C::char_type>
inline
typename
std
::
enable_if
<
!
convert_to_int
<
T
,
Char
>::
value
&&
!
std
::
is_convertible
<
T
,
basic_string_view
<
Char
>>::
value
&&
!
std
::
is_constructible
<
basic_string_view
<
Char
>
,
T
>::
value
,
!
internal
::
is_constructible
<
basic_string_view
<
Char
>
,
T
>::
value
,
// Implicit conversion to std::string is not handled here because it's
// unsafe: https://github.com/fmtlib/fmt/issues/729
init
<
C
,
const
T
&
,
custom_type
>>::
type
...
...
@@ -1253,11 +1261,10 @@ namespace internal {
// If S is a format string type, format_string_traints<S>::char_type gives its
// character type.
template
<
typename
S
,
typename
Enable
=
void
>
struct
format_string_traits
{
private:
// Use constructability as a way to detect if format_string_traits is
// specialized because other methods are broken on MSVC2013.
format_string_traits
();
class
format_string_traits
{
// Use emptyness as a way to detect if format_string_traits is
// specialized because other methods are broken on MSVC2013 or gcc 4.4.
int
dummy
;
};
template
<
typename
Char
>
...
...
@@ -1285,11 +1292,6 @@ struct format_string_traits<
basic_string_view
<
typename
S
::
char_type
>
,
S
>::
value
>::
type
>
:
format_string_traits_base
<
typename
S
::
char_type
>
{};
template
<
typename
S
>
struct
is_format_string
:
std
::
integral_constant
<
bool
,
std
::
is_constructible
<
format_string_traits
<
S
>>::
value
>
{};
template
<
typename
S
>
struct
is_compile_string
:
std
::
integral_constant
<
bool
,
std
::
is_base_of
<
compile_string
,
S
>::
value
>
{};
...
...
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