The macro ZMQ_DELETED_FUNCTION
was apparently introduced to provide conditional support for such C++11 feature as "deleted functions" (= delete
). Your compiler does not seem to support that C++11 feature. Hence the error.
By design, the zmq.hpp
attempts to set this macro automatically, by analyzing the compiler version and defining the macro accordingly. It is possible that this automatic detection is being too optimistic. However, it is also possible that your compiler actually supports that feature, you just forgot to turn it on in the compiler settings.
BTW, I'm looking at the Clang section of the code that defines the macro
#elif defined(__clang__)
#if __has_feature(cxx_rvalue_references)
#define ZMQ_HAS_RVALUE_REFS
#endif
#if __has_feature(cxx_deleted_functions)
#define ZMQ_DELETED_FUNCTION = delete
#endif
and it looks broken to me. If the compiler does not support cxx_deleted_functions
feature, then macro ZMQ_DELETED_FUNCTION
remains undefined (instead of being defined as empty). This is wrong.
Are you using Clang? If so, this could actually be the reason for your error. In that case the error can be fixed by pre-defining ZMQ_DELETED_FUNCTION
as an empty macro, either as a global macro definition or in the source code before including zmq.hpp
.