New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction for late binding to local listener on api server #1227

Merged
merged 1 commit into from Jun 6, 2018

Conversation

Projects
None yet
4 participants
@AndreaLanfranchi
Collaborator

AndreaLanfranchi commented Jun 6, 2018

Amends #1223

@AndreaLanfranchi AndreaLanfranchi changed the base branch from master to release/0.15 Jun 6, 2018

@chfast

chfast approved these changes Jun 6, 2018

@chfast chfast merged commit 076b469 into release/0.15 Jun 6, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chfast chfast deleted the api-server branch Jun 6, 2018

m_acceptor.bind(endpoint);
m_acceptor.listen(64);
}
catch (const std::exception& _e)

This comment has been minimized.

@XhmikosR

XhmikosR Jun 15, 2018

Collaborator

@AndreaLanfranchi: _e is unreferenced here; MSVC complains about it :)

@XhmikosR

XhmikosR Jun 15, 2018

Collaborator

@AndreaLanfranchi: _e is unreferenced here; MSVC complains about it :)

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi Jun 15, 2018

Collaborator

It's a very strange complaint as it's quite common standard to catch exception by reference. Do you mean it wants it by value ?

@AndreaLanfranchi

AndreaLanfranchi Jun 15, 2018

Collaborator

It's a very strange complaint as it's quite common standard to catch exception by reference. Do you mean it wants it by value ?

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@XhmikosR

XhmikosR Jun 15, 2018

Collaborator

Maybe just using one of MSVC's macros like UNREFERENCED_PARAMETER(_e); should do the trick.

@XhmikosR

XhmikosR Jun 15, 2018

Collaborator

Maybe just using one of MSVC's macros like UNREFERENCED_PARAMETER(_e); should do the trick.

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi Jun 15, 2018

Collaborator

Will the directive be accepted by other compilers ? Or should I enclose it in a conditional block if _WIN32 ?

@AndreaLanfranchi

AndreaLanfranchi Jun 15, 2018

Collaborator

Will the directive be accepted by other compilers ? Or should I enclose it in a conditional block if _WIN32 ?

This comment has been minimized.

@XhmikosR

XhmikosR Jun 15, 2018

Collaborator

This macro is MSVC specific, so we probably need to wrap it.

@XhmikosR

XhmikosR Jun 15, 2018

Collaborator

This macro is MSVC specific, so we probably need to wrap it.

This comment has been minimized.

@chfast

chfast Jun 15, 2018

Contributor

Just omit the name _e.

@chfast

chfast Jun 15, 2018

Contributor

Just omit the name _e.

This comment has been minimized.

@jean-m-cyr

jean-m-cyr Jun 15, 2018

Collaborator

@chfast approach is commonly used. ie. catch (const std::exception&)

Or, you can just add a "(void)_ec;" statement in the block. It doesn't generate any machine code and will satisfy the compiler. It's how you did it in K&R C.

@jean-m-cyr

jean-m-cyr Jun 15, 2018

Collaborator

@chfast approach is commonly used. ie. catch (const std::exception&)

Or, you can just add a "(void)_ec;" statement in the block. It doesn't generate any machine code and will satisfy the compiler. It's how you did it in K&R C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment