Problem: call of overloaded ‘pow()’ is ambiguous

Solution: make base a double value
This commit is contained in:
Constantin Rack 2015-11-13 09:47:03 +01:00
parent 18c517020b
commit 98d5d4d7f0

View File

@ -285,13 +285,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
case ZMQ_TCP_RECV_BUFFER:
if (is_int && (value >= 0 && value <= 10) ) {
tcp_recv_buffer_size = static_cast<int>(std::pow(2, value)) * 1024;
tcp_recv_buffer_size = static_cast<int>(std::pow(2.0, value)) * 1024;
}
break;
case ZMQ_TCP_SEND_BUFFER:
if (is_int && (value >= 0 && value <= 10) ) {
tcp_send_buffer_size = static_cast<int>(std::pow(2, value)) * 1024;
tcp_send_buffer_size = static_cast<int>(std::pow(2.0, value)) * 1024;
}
break;