Skip to content

Commit

Permalink
[src] Fix Visual Studio error due to alternate syntactic form of nore…
Browse files Browse the repository at this point in the history
…turn (#3018)
  • Loading branch information
daanzu authored and danpovey committed Feb 1, 2019
1 parent 6f56512 commit 56cfb95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/kaldi-error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ FatalMessageLogger::FatalMessageLogger(LogMessageEnvelope::Severity severity,
}
}

[[ noreturn ]] FatalMessageLogger::~FatalMessageLogger() noexcept(false) {
FatalMessageLogger::~FatalMessageLogger [[ noreturn ]] () noexcept(false) {
std::string str = GetMessage();

// print the mesage (or send to logging handler),
Expand Down

5 comments on commit 56cfb95

@calderma
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried to compile this on ubuntu 16.04.4 and received the following error:

kaldi-error.cc:224:1: error: invalid use of destructor ‘~kaldi::FatalMessageLogger’ as a type
kaldi::FatalMessageLogger::~FatalMessageLogger [[ noreturn ]] () noexcept(false) {

if I revert this change everything compiles correctly. g++ version yields:

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

@emoface1337
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem.

@jtrmal
Copy link
Contributor

@jtrmal jtrmal commented on 56cfb95 Feb 2, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brijmohan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error still exists. Please check.

@danpovey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I merged the fix now.

Please sign in to comment.