Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libconfig
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
libconfig
Commits
18193744
Commit
18193744
authored
Dec 14, 2019
by
Mark Lindner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use noexcept in C++17.
parent
52b00231
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
16 deletions
+22
-16
lib/libconfig.h++
lib/libconfig.h++
+14
-8
lib/libconfigcpp.c++
lib/libconfigcpp.c++
+8
-8
No files found.
lib/libconfig.h++
View file @
18193744
...
...
@@ -43,6 +43,12 @@
#define LIBCONFIGXX_VER_MINOR 7
#define LIBCONFIGXX_VER_REVISION 0
#if __cplusplus < 201103L
#define LIBCONFIGXX_NOEXCEPT throw()
#else
#define LIBCONFIGXX_NOEXCEPT noexcept
#endif
struct
config_t
;
// fwd decl
struct
config_setting_t
;
// fwd decl
...
...
@@ -66,11 +72,11 @@ class LIBCONFIGXX_API SettingException : public ConfigException
SettingException
(
const
SettingException
&
other
);
SettingException
&
operator
=
(
const
SettingException
&
other
);
virtual
~
SettingException
()
throw
()
;
virtual
~
SettingException
()
LIBCONFIGXX_NOEXCEPT
;
const
char
*
getPath
()
const
;
virtual
const
char
*
what
()
const
throw
()
;
virtual
const
char
*
what
()
const
LIBCONFIGXX_NOEXCEPT
;
private:
...
...
@@ -85,7 +91,7 @@ class LIBCONFIGXX_API SettingTypeException : public SettingException
SettingTypeException
(
const
Setting
&
setting
,
int
idx
);
SettingTypeException
(
const
Setting
&
setting
,
const
char
*
name
);
virtual
const
char
*
what
()
const
throw
()
;
virtual
const
char
*
what
()
const
LIBCONFIGXX_NOEXCEPT
;
};
class
LIBCONFIGXX_API
SettingNotFoundException
:
public
SettingException
...
...
@@ -96,7 +102,7 @@ class LIBCONFIGXX_API SettingNotFoundException : public SettingException
SettingNotFoundException
(
const
Setting
&
setting
,
int
idx
);
SettingNotFoundException
(
const
Setting
&
setting
,
const
char
*
name
);
virtual
const
char
*
what
()
const
throw
()
;
virtual
const
char
*
what
()
const
LIBCONFIGXX_NOEXCEPT
;
};
class
LIBCONFIGXX_API
SettingNameException
:
public
SettingException
...
...
@@ -105,14 +111,14 @@ class LIBCONFIGXX_API SettingNameException : public SettingException
SettingNameException
(
const
Setting
&
setting
,
const
char
*
name
);
virtual
const
char
*
what
()
const
throw
()
;
virtual
const
char
*
what
()
const
LIBCONFIGXX_NOEXCEPT
;
};
class
LIBCONFIGXX_API
FileIOException
:
public
ConfigException
{
public:
virtual
const
char
*
what
()
const
throw
()
;
virtual
const
char
*
what
()
const
LIBCONFIGXX_NOEXCEPT
;
};
class
LIBCONFIGXX_API
ParseException
:
public
ConfigException
...
...
@@ -123,7 +129,7 @@ class LIBCONFIGXX_API ParseException : public ConfigException
ParseException
(
const
ParseException
&
other
);
virtual
~
ParseException
()
throw
()
;
virtual
~
ParseException
()
LIBCONFIGXX_NOEXCEPT
;
inline
const
char
*
getFile
()
const
{
return
(
_file
);
}
...
...
@@ -134,7 +140,7 @@ class LIBCONFIGXX_API ParseException : public ConfigException
inline
const
char
*
getError
()
const
{
return
(
_error
);
}
virtual
const
char
*
what
()
const
throw
()
;
virtual
const
char
*
what
()
const
LIBCONFIGXX_NOEXCEPT
;
private:
...
...
lib/libconfigcpp.c++
View file @
18193744
...
...
@@ -65,14 +65,14 @@ ParseException::ParseException(const ParseException &other)
// ---------------------------------------------------------------------------
ParseException
::~
ParseException
()
throw
()
ParseException
::~
ParseException
()
LIBCONFIGXX_NOEXCEPT
{
::
free
((
void
*
)
_file
);
}
// ---------------------------------------------------------------------------
const
char
*
ParseException
::
what
()
const
throw
()
const
char
*
ParseException
::
what
()
const
LIBCONFIGXX_NOEXCEPT
{
return
(
"ParseException"
);
}
...
...
@@ -211,14 +211,14 @@ SettingException &SettingException::operator=(const SettingException &other)
// ---------------------------------------------------------------------------
const
char
*
SettingException
::
what
()
const
throw
()
const
char
*
SettingException
::
what
()
const
LIBCONFIGXX_NOEXCEPT
{
return
(
"SettingException"
);
}
// ---------------------------------------------------------------------------
SettingException
::~
SettingException
()
throw
()
SettingException
::~
SettingException
()
LIBCONFIGXX_NOEXCEPT
{
::
free
(
_path
);
}
...
...
@@ -247,7 +247,7 @@ SettingTypeException::SettingTypeException(const Setting &setting,
// ---------------------------------------------------------------------------
const
char
*
SettingTypeException
::
what
()
const
throw
()
const
char
*
SettingTypeException
::
what
()
const
LIBCONFIGXX_NOEXCEPT
{
return
(
"SettingTypeException"
);
}
...
...
@@ -277,7 +277,7 @@ SettingNotFoundException::SettingNotFoundException(const char *path)
// ---------------------------------------------------------------------------
const
char
*
SettingNotFoundException
::
what
()
const
throw
()
const
char
*
SettingNotFoundException
::
what
()
const
LIBCONFIGXX_NOEXCEPT
{
return
(
"SettingNotFoundException"
);
}
...
...
@@ -292,14 +292,14 @@ SettingNameException::SettingNameException(const Setting &setting,
// ---------------------------------------------------------------------------
const
char
*
SettingNameException
::
what
()
const
throw
()
const
char
*
SettingNameException
::
what
()
const
LIBCONFIGXX_NOEXCEPT
{
return
(
"SettingNameException"
);
}
// ---------------------------------------------------------------------------
const
char
*
FileIOException
::
what
()
const
throw
()
const
char
*
FileIOException
::
what
()
const
LIBCONFIGXX_NOEXCEPT
{
return
(
"FileIOException"
);
}
...
...
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