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
153f753b
Commit
153f753b
authored
Mar 04, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate undocumented _u suffix
parent
eafd0798
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
13 deletions
+2
-13
include/fmt/format.h
include/fmt/format.h
+2
-1
test/format-test.cc
test/format-test.cc
+0
-12
No files found.
include/fmt/format.h
View file @
153f753b
...
@@ -566,7 +566,8 @@ class FMT_DEPRECATED u8string_view : public basic_string_view<char8_t> {
...
@@ -566,7 +566,8 @@ class FMT_DEPRECATED u8string_view : public basic_string_view<char8_t> {
#if FMT_USE_USER_DEFINED_LITERALS
#if FMT_USE_USER_DEFINED_LITERALS
inline
namespace
literals
{
inline
namespace
literals
{
inline
basic_string_view
<
char8_t
>
operator
""
_u
(
const
char
*
s
,
std
::
size_t
n
)
{
FMT_DEPRECATED
inline
basic_string_view
<
char8_t
>
operator
""
_u
(
const
char
*
s
,
std
::
size_t
n
)
{
return
{
reinterpret_cast
<
const
char8_t
*>
(
s
),
n
};
return
{
reinterpret_cast
<
const
char8_t
*>
(
s
),
n
};
}
}
}
// namespace literals
}
// namespace literals
...
...
test/format-test.cc
View file @
153f753b
...
@@ -2523,18 +2523,6 @@ std::string from_u8str(const fmt::basic_string_view<char8_t>& str) {
...
@@ -2523,18 +2523,6 @@ std::string from_u8str(const fmt::basic_string_view<char8_t>& str) {
return
std
::
string
(
str
.
begin
(),
str
.
end
());
return
std
::
string
(
str
.
begin
(),
str
.
end
());
}
}
#if FMT_USE_USER_DEFINED_LITERALS
TEST
(
FormatTest
,
U8StringViewLiteral
)
{
using
namespace
fmt
::
literals
;
fmt
::
basic_string_view
<
char8_t
>
s
=
"ab"
_u
;
EXPECT_EQ
(
s
.
size
(),
2u
);
const
char8_t
*
data
=
s
.
data
();
EXPECT_EQ
(
char
(
data
[
0
]),
'a'
);
EXPECT_EQ
(
char
(
data
[
1
]),
'b'
);
EXPECT_EQ
(
from_u8str
(
format
(
"{:*^5}"
_u
,
"🤡"
_u
)),
from_u8str
(
"**🤡**"
_u
));
}
#endif
TEST
(
FormatTest
,
EmphasisNonHeaderOnly
)
{
TEST
(
FormatTest
,
EmphasisNonHeaderOnly
)
{
// Ensure this compiles even if FMT_HEADER_ONLY is not defined.
// Ensure this compiles even if FMT_HEADER_ONLY is not defined.
EXPECT_EQ
(
fmt
::
format
(
fmt
::
emphasis
::
bold
,
"bold error"
),
EXPECT_EQ
(
fmt
::
format
(
fmt
::
emphasis
::
bold
,
"bold error"
),
...
...
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