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
edeb3d80
Commit
edeb3d80
authored
May 21, 2022
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated APIs
parent
496aff7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
67 deletions
+3
-67
include/fmt/color.h
include/fmt/color.h
+2
-44
include/fmt/ostream.h
include/fmt/ostream.h
+1
-8
include/fmt/ranges.h
include/fmt/ranges.h
+0
-5
include/fmt/xchar.h
include/fmt/xchar.h
+0
-10
No files found.
include/fmt/color.h
View file @
edeb3d80
...
@@ -10,13 +10,6 @@
...
@@ -10,13 +10,6 @@
#include "format.h"
#include "format.h"
// __declspec(deprecated) is broken in some MSVC versions.
#if FMT_MSC_VER
# define FMT_DEPRECATED_NONMSVC
#else
# define FMT_DEPRECATED_NONMSVC FMT_DEPRECATED
#endif
FMT_BEGIN_NAMESPACE
FMT_BEGIN_NAMESPACE
FMT_MODULE_EXPORT_BEGIN
FMT_MODULE_EXPORT_BEGIN
...
@@ -270,16 +263,6 @@ class text_style {
...
@@ -270,16 +263,6 @@ class text_style {
return
lhs
|=
rhs
;
return
lhs
|=
rhs
;
}
}
FMT_DEPRECATED_NONMSVC
FMT_CONSTEXPR
text_style
&
operator
&=
(
const
text_style
&
rhs
)
{
return
and_assign
(
rhs
);
}
FMT_DEPRECATED_NONMSVC
friend
FMT_CONSTEXPR
text_style
operator
&
(
text_style
lhs
,
const
text_style
&
rhs
)
{
return
lhs
.
and_assign
(
rhs
);
}
FMT_CONSTEXPR
bool
has_foreground
()
const
noexcept
{
FMT_CONSTEXPR
bool
has_foreground
()
const
noexcept
{
return
set_foreground_color
;
return
set_foreground_color
;
}
}
...
@@ -315,31 +298,6 @@ class text_style {
...
@@ -315,31 +298,6 @@ class text_style {
}
}
}
}
// DEPRECATED!
FMT_CONSTEXPR
text_style
&
and_assign
(
const
text_style
&
rhs
)
{
if
(
!
set_foreground_color
)
{
set_foreground_color
=
rhs
.
set_foreground_color
;
foreground_color
=
rhs
.
foreground_color
;
}
else
if
(
rhs
.
set_foreground_color
)
{
if
(
!
foreground_color
.
is_rgb
||
!
rhs
.
foreground_color
.
is_rgb
)
FMT_THROW
(
format_error
(
"can't AND a terminal color"
));
foreground_color
.
value
.
rgb_color
&=
rhs
.
foreground_color
.
value
.
rgb_color
;
}
if
(
!
set_background_color
)
{
set_background_color
=
rhs
.
set_background_color
;
background_color
=
rhs
.
background_color
;
}
else
if
(
rhs
.
set_background_color
)
{
if
(
!
background_color
.
is_rgb
||
!
rhs
.
background_color
.
is_rgb
)
FMT_THROW
(
format_error
(
"can't AND a terminal color"
));
background_color
.
value
.
rgb_color
&=
rhs
.
background_color
.
value
.
rgb_color
;
}
ems
=
static_cast
<
emphasis
>
(
static_cast
<
uint8_t
>
(
ems
)
&
static_cast
<
uint8_t
>
(
rhs
.
ems
));
return
*
this
;
}
friend
FMT_CONSTEXPR_DECL
text_style
friend
FMT_CONSTEXPR_DECL
text_style
fg
(
detail
::
color_type
foreground
)
noexcept
;
fg
(
detail
::
color_type
foreground
)
noexcept
;
...
@@ -679,8 +637,8 @@ struct formatter<detail::styled_arg<T>, Char> : formatter<T, Char> {
...
@@ -679,8 +637,8 @@ struct formatter<detail::styled_arg<T>, Char> : formatter<T, Char> {
**Example**::
**Example**::
fmt::print("Elapsed time: {s:.2f} seconds",
fmt::print("Elapsed time: {s:.2f} seconds",
fmt::styled(1.23, fmt::fg(fmt::color::green) |
fmt::bg(fmt::color::blue)));
fmt::styled(1.23, fmt::fg(fmt::color::green) |
\endrst
fmt::bg(fmt::color::blue)));
\endrst
*/
*/
template
<
typename
T
>
template
<
typename
T
>
FMT_CONSTEXPR
auto
styled
(
const
T
&
value
,
text_style
ts
)
FMT_CONSTEXPR
auto
styled
(
const
T
&
value
,
text_style
ts
)
...
...
include/fmt/ostream.h
View file @
edeb3d80
...
@@ -144,15 +144,8 @@ template <typename T, typename Char>
...
@@ -144,15 +144,8 @@ template <typename T, typename Char>
struct
fallback_formatter
<
T
,
Char
,
enable_if_t
<
is_streamable
<
T
,
Char
>::
value
>>
struct
fallback_formatter
<
T
,
Char
,
enable_if_t
<
is_streamable
<
T
,
Char
>::
value
>>
:
basic_ostream_formatter
<
Char
>
{
:
basic_ostream_formatter
<
Char
>
{
using
basic_ostream_formatter
<
Char
>::
format
;
using
basic_ostream_formatter
<
Char
>::
format
;
// DEPRECATED!
template
<
typename
OutputIt
>
auto
format
(
const
T
&
value
,
basic_printf_context
<
OutputIt
,
Char
>&
ctx
)
const
->
OutputIt
{
auto
buffer
=
basic_memory_buffer
<
Char
>
();
format_value
(
buffer
,
value
,
ctx
.
locale
());
return
std
::
copy
(
buffer
.
begin
(),
buffer
.
end
(),
ctx
.
out
());
}
};
};
}
// namespace detail
}
// namespace detail
FMT_MODULE_EXPORT
FMT_MODULE_EXPORT
...
...
include/fmt/ranges.h
View file @
edeb3d80
...
@@ -391,13 +391,8 @@ struct formatter<
...
@@ -391,13 +391,8 @@ struct formatter<
template
<
typename
FormatContext
>
template
<
typename
FormatContext
>
auto
format
(
range_type
&
range
,
FormatContext
&
ctx
)
const
auto
format
(
range_type
&
range
,
FormatContext
&
ctx
)
const
->
decltype
(
ctx
.
out
())
{
->
decltype
(
ctx
.
out
())
{
#ifdef FMT_DEPRECATED_BRACED_RANGES
Char
prefix
=
'{'
;
Char
postfix
=
'}'
;
#else
Char
prefix
=
detail
::
is_set
<
R
>::
value
?
'{'
:
'['
;
Char
prefix
=
detail
::
is_set
<
R
>::
value
?
'{'
:
'['
;
Char
postfix
=
detail
::
is_set
<
R
>::
value
?
'}'
:
']'
;
Char
postfix
=
detail
::
is_set
<
R
>::
value
?
'}'
:
']'
;
#endif
detail
::
range_mapper
<
buffer_context
<
Char
>>
mapper
;
detail
::
range_mapper
<
buffer_context
<
Char
>>
mapper
;
auto
out
=
ctx
.
out
();
auto
out
=
ctx
.
out
();
*
out
++
=
prefix
;
*
out
++
=
prefix
;
...
...
include/fmt/xchar.h
View file @
edeb3d80
...
@@ -136,16 +136,6 @@ inline auto format_to(OutputIt out, const S& fmt, Args&&... args) -> OutputIt {
...
@@ -136,16 +136,6 @@ inline auto format_to(OutputIt out, const S& fmt, Args&&... args) -> OutputIt {
fmt
::
make_format_args
<
buffer_context
<
Char
>>
(
args
...));
fmt
::
make_format_args
<
buffer_context
<
Char
>>
(
args
...));
}
}
template
<
typename
S
,
typename
...
Args
,
typename
Char
,
size_t
SIZE
,
typename
Allocator
,
FMT_ENABLE_IF
(
detail
::
is_string
<
S
>
::
value
)
>
FMT_DEPRECATED
auto
format_to
(
basic_memory_buffer
<
Char
,
SIZE
,
Allocator
>&
buf
,
const
S
&
format_str
,
Args
&&
...
args
)
->
typename
buffer_context
<
Char
>::
iterator
{
detail
::
vformat_to
(
buf
,
to_string_view
(
format_str
),
fmt
::
make_format_args
<
buffer_context
<
Char
>>
(
args
...),
{});
return
detail
::
buffer_appender
<
Char
>
(
buf
);
}
template
<
typename
Locale
,
typename
S
,
typename
OutputIt
,
typename
...
Args
,
template
<
typename
Locale
,
typename
S
,
typename
OutputIt
,
typename
...
Args
,
typename
Char
=
char_t
<
S
>,
typename
Char
=
char_t
<
S
>,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
Char
>::
value
&&
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
Char
>::
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