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
d75fd2c7
Commit
d75fd2c7
authored
Jun 26, 2021
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wchar support under msvc
parent
cdad84aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
include/spdlog/common.h
include/spdlog/common.h
+4
-0
include/spdlog/fmt/xchar.h
include/spdlog/fmt/xchar.h
+20
-0
include/spdlog/sinks/daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+4
-0
No files found.
include/spdlog/common.h
View file @
d75fd2c7
...
...
@@ -35,6 +35,10 @@
#include <spdlog/fmt/fmt.h>
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
# include <spdlog/fmt/xchar.h>
#endif
// visual studio upto 2013 does not support noexcept nor constexpr
#if defined(_MSC_VER) && (_MSC_VER < 1900)
# define SPDLOG_NOEXCEPT _NOEXCEPT
...
...
include/spdlog/fmt/xchar.h
0 → 100644
View file @
d75fd2c7
//
// Copyright(c) 2016 Gabi Melman.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
#pragma once
//
// include bundled or external copy of fmtlib's ostream support
//
#if !defined(SPDLOG_FMT_EXTERNAL)
#ifdef SPDLOG_HEADER_ONLY
#ifndef FMT_HEADER_ONLY
#define FMT_HEADER_ONLY
#endif
#endif
#include <spdlog/fmt/bundled/xchar.h>
#else
#include <fmt/xchar.h>
#endif
include/spdlog/sinks/daily_file_sink.h
View file @
d75fd2c7
...
...
@@ -50,7 +50,11 @@ struct daily_filename_format_calculator
{
// generate fmt datetime format string, e.g. {:%Y-%m-%d}.
filename_t
fmt_filename
=
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{{:{}}}"
),
filename
);
#if defined(_MSC_VER) && defined(SPDLOG_WCHAR_FILENAMES) // for some reason msvc doesnt allow fmt::runtime(..) with wchar here
return
fmt
::
format
(
fmt_filename
,
now_tm
);
#else
return
fmt
::
format
(
fmt
::
runtime
(
fmt_filename
),
now_tm
);
#endif
}
};
...
...
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