Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
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
spdlog
Commits
e69699e1
Commit
e69699e1
authored
Jun 08, 2020
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable_if
parent
d6dbdbf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
include/spdlog/logger.h
include/spdlog/logger.h
+5
-7
No files found.
include/spdlog/logger.h
View file @
e69699e1
...
...
@@ -74,8 +74,7 @@ public:
void
swap
(
spdlog
::
logger
&
other
)
SPDLOG_NOEXCEPT
;
// FormatString is a type derived from fmt::compile_string
template
<
typename
FormatString
,
typename
std
::
enable_if
<
fmt
::
is_compile_string
<
FormatString
>
::
value
,
int
>::
type
*
=
nullptr
,
typename
...
Args
>
template
<
typename
FormatString
,
typename
std
::
enable_if
<
fmt
::
is_compile_string
<
FormatString
>
::
value
,
int
>::
type
=
0
,
typename
...
Args
>
void
log
(
source_loc
loc
,
level
::
level_enum
lvl
,
const
FormatString
&
fmt
,
const
Args
&
...
args
)
{
log_
(
loc
,
lvl
,
fmt
,
args
...);
...
...
@@ -137,9 +136,8 @@ public:
}
// T can be statically converted to string_view and isn't a fmt::compile_string
template
<
class
T
,
typename
std
::
enable_if
<
std
::
is_convertible
<
const
T
&
,
spdlog
::
string_view_t
>
::
value
&&
!
fmt
::
is_compile_string
<
T
>::
value
,
T
>::
type
*
=
nullptr
>
template
<
class
T
,
typename
std
::
enable_if
<
std
::
is_convertible
<
const
T
&
,
spdlog
::
string_view_t
>
::
value
&&
!
fmt
::
is_compile_string
<
T
>::
value
,
int
>::
type
=
0
>
void
log
(
source_loc
loc
,
level
::
level_enum
lvl
,
const
T
&
msg
)
{
log
(
loc
,
lvl
,
string_view_t
{
msg
});
...
...
@@ -179,7 +177,7 @@ public:
// T cannot be statically converted to string_view or wstring_view
template
<
class
T
,
typename
std
::
enable_if
<!
std
::
is_convertible
<
const
T
&
,
spdlog
::
string_view_t
>
::
value
&&
!
is_convertible_to_wstring_view
<
const
T
&>::
value
,
T
>::
type
*
=
nullptr
>
int
>::
type
=
0
>
void
log
(
source_loc
loc
,
level
::
level_enum
lvl
,
const
T
&
msg
)
{
log
(
loc
,
lvl
,
"{}"
,
msg
);
...
...
@@ -250,7 +248,7 @@ public:
}
// T can be statically converted to wstring_view
template
<
class
T
,
typename
std
::
enable_if
<
is_convertible_to_wstring_view
<
const
T
&
>
::
value
,
T
>::
type
*
=
nullptr
>
template
<
class
T
,
typename
std
::
enable_if
<
is_convertible_to_wstring_view
<
const
T
&
>
::
value
,
int
>::
type
=
0
>
void
log
(
source_loc
loc
,
level
::
level_enum
lvl
,
const
T
&
msg
)
{
bool
log_enabled
=
should_log
(
lvl
);
...
...
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