Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Yoann HOUPERT
kaldi_2015
Commits
fdcd472b
Commit
fdcd472b
authored
Aug 04, 2015
by
Daniel Povey
Browse files
Fix noexcept define guard so it is not used in unsupported versions of C++.
parent
42aa2ad7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/base/kaldi-error.cc
src/base/kaldi-error.cc
+1
-1
src/base/kaldi-error.h
src/base/kaldi-error.h
+4
-4
No files found.
src/base/kaldi-error.cc
View file @
fdcd472b
...
...
@@ -170,7 +170,7 @@ KaldiErrorMessage::KaldiErrorMessage(const char *func, const char *file,
<<
GetShortFileName
(
file
)
<<
':'
<<
line
<<
") "
;
}
KaldiErrorMessage
::~
KaldiErrorMessage
()
NOEXCEPT
(
false
)
{
KaldiErrorMessage
::~
KaldiErrorMessage
()
KALDI_
NOEXCEPT
(
false
)
{
// (1) Print the message to stderr.
std
::
cerr
<<
ss
.
str
()
<<
'\n'
;
// (2) Throw an exception with the message, plus traceback info if available.
...
...
src/base/kaldi-error.h
View file @
fdcd472b
...
...
@@ -27,10 +27,10 @@
#include <sstream>
#include <cstdio>
#if _MSC_VER >= 1900 || (!defined(_MSC_VER) && __cplusplus >
199711
L) || defined(__GXX_EXPERIMENTAL_CXX0X__)
#define NOEXCEPT(Predicate) noexcept((Predicate))
#if _MSC_VER >= 1900 || (!defined(_MSC_VER) && __cplusplus >
= 201103
L) || defined(__GXX_EXPERIMENTAL_CXX0X__)
#define
KALDI_
NOEXCEPT(Predicate) noexcept((Predicate))
#else
#define NOEXCEPT(Predicate)
#define
KALDI_
NOEXCEPT(Predicate)
#endif
#include "base/kaldi-types.h"
...
...
@@ -103,7 +103,7 @@ class KaldiErrorMessage {
public:
KaldiErrorMessage
(
const
char
*
func
,
const
char
*
file
,
int32
line
);
inline
std
::
ostream
&
stream
()
{
return
ss
;
}
~
KaldiErrorMessage
()
NOEXCEPT
(
false
);
// defined in kaldi-error.cc
~
KaldiErrorMessage
()
KALDI_
NOEXCEPT
(
false
);
// defined in kaldi-error.cc
private:
std
::
ostringstream
ss
;
};
...
...
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