zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.97k stars 757 forks source link

Fix error: default initialization of an object of const type #407

Closed jcfr closed 4 years ago

jcfr commented 4 years ago

This commit fixes a regression introduced in a3e5b54c3 (Problem: Socket options lack type-safety (#393)).

It addresses the following error reported when building the project on macOS 10.11.6.

Errors like the following:

  cppzmq/zmq.hpp:1325:39: error: default initialization of an object of const type 'const affinity_t' (aka 'const integral_option<4, unsigned long long, false>') without a user-provided default constructor

Compiler version:

  Apple LLVM version 8.0.0 (clang-800.0.42.1)
  Target: x86_64-apple-darwin15.6.0
  Thread model: posix
  InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Similar issues:

gummif commented 4 years ago

Looks good to me, will have to wait for @sigiesec for approval.

jcfr commented 4 years ago

Looks good to me, will have to wait for @sigiesec for approval.

Sounds good. Thanks again for your help :pray:

jcfr commented 4 years ago

Let me know if you need anything else.

The travis error also seems unrelated:

Reading package lists...

Building dependency tree...

Reading state information...

E: Unable to locate package g++-9

E: Couldn't find any package by regex 'g++-9'
apt-get.diagnostics

apt-get install failed

The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install g++-9 clang-8" failed and exited with 100 during .

See https://travis-ci.org/github/zeromq/cppzmq/jobs/683591543

sigiesec commented 4 years ago

Thanks for fixing this!

Yes, the travis failure was an infrastructure issue, it went away after retriggering the job.