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
e462da82
Unverified
Commit
e462da82
authored
Jan 01, 2022
by
Björn Schäpers
Committed by
GitHub
Jan 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some noexcept (#2684)
I got warnings from -Wnoexcept, fixed them.
parent
79c66d66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
include/fmt/core.h
include/fmt/core.h
+9
-9
No files found.
include/fmt/core.h
View file @
e462da82
...
@@ -475,19 +475,19 @@ template <typename Char> class basic_string_view {
...
@@ -475,19 +475,19 @@ template <typename Char> class basic_string_view {
size_
(
s
.
size
())
{}
size_
(
s
.
size
())
{}
/** Returns a pointer to the string data. */
/** Returns a pointer to the string data. */
constexpr
auto
data
()
const
->
const
Char
*
{
return
data_
;
}
constexpr
auto
data
()
const
FMT_NOEXCEPT
->
const
Char
*
{
return
data_
;
}
/** Returns the string size. */
/** Returns the string size. */
constexpr
auto
size
()
const
->
size_t
{
return
size_
;
}
constexpr
auto
size
()
const
FMT_NOEXCEPT
->
size_t
{
return
size_
;
}
constexpr
auto
begin
()
const
->
iterator
{
return
data_
;
}
constexpr
auto
begin
()
const
FMT_NOEXCEPT
->
iterator
{
return
data_
;
}
constexpr
auto
end
()
const
->
iterator
{
return
data_
+
size_
;
}
constexpr
auto
end
()
const
FMT_NOEXCEPT
->
iterator
{
return
data_
+
size_
;
}
constexpr
auto
operator
[](
size_t
pos
)
const
->
const
Char
&
{
constexpr
auto
operator
[](
size_t
pos
)
const
FMT_NOEXCEPT
->
const
Char
&
{
return
data_
[
pos
];
return
data_
[
pos
];
}
}
FMT_CONSTEXPR
void
remove_prefix
(
size_t
n
)
{
FMT_CONSTEXPR
void
remove_prefix
(
size_t
n
)
FMT_NOEXCEPT
{
data_
+=
n
;
data_
+=
n
;
size_
-=
n
;
size_
-=
n
;
}
}
...
@@ -1496,14 +1496,14 @@ class appender : public std::back_insert_iterator<detail::buffer<char>> {
...
@@ -1496,14 +1496,14 @@ class appender : public std::back_insert_iterator<detail::buffer<char>> {
public:
public:
using
std
::
back_insert_iterator
<
detail
::
buffer
<
char
>>::
back_insert_iterator
;
using
std
::
back_insert_iterator
<
detail
::
buffer
<
char
>>::
back_insert_iterator
;
appender
(
base
it
)
:
base
(
it
)
{}
appender
(
base
it
)
FMT_NOEXCEPT
:
base
(
it
)
{}
using
_Unchecked_type
=
appender
;
// Mark iterator as checked.
using
_Unchecked_type
=
appender
;
// Mark iterator as checked.
auto
operator
++
()
->
appender
&
{
auto
operator
++
()
FMT_NOEXCEPT
->
appender
&
{
return
*
this
;
return
*
this
;
}
}
auto
operator
++
(
int
)
->
appender
{
auto
operator
++
(
int
)
FMT_NOEXCEPT
->
appender
{
return
*
this
;
return
*
this
;
}
}
};
};
...
...
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