boostorg / lockfree

Boost.Lockfree
126 stars 86 forks source link

unsynchronized_push does not compile while stack capacity is specified #57

Closed caizongchao closed 4 years ago

caizongchao commented 4 years ago

The code below does not compile( boost 1.72, visual c++ 2019 community), the error message is:

boost\boost\lockfree\stack.hpp(241,42): error C2440: '=': cannot convert from 'T *' to 'unsigned short'

#include <boost/lockfree/stack.hpp>

int main()
{
    boost::lockfree::stack<int, boost::lockfree::capacity<256>> int_stack;

    int_stack.unsynchronized_push(100);

    return 0;
}