lock()
{
if (!_M_device)
- __throw_system_error((int)errc::operation_not_permitted);
+ __throw_system_error(int(errc::operation_not_permitted));
else if (_M_owns)
- __throw_system_error((int)errc::resource_deadlock_would_occur);
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
else
{
_M_device->lock();
try_lock()
{
if (!_M_device)
- __throw_system_error((int)errc::operation_not_permitted);
+ __throw_system_error(int(errc::operation_not_permitted));
else if (_M_owns)
- __throw_system_error((int)errc::resource_deadlock_would_occur);
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
else
{
_M_owns = _M_device->try_lock();
try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
{
if (!_M_device)
- __throw_system_error((int)errc::operation_not_permitted);
+ __throw_system_error(int(errc::operation_not_permitted));
else if (_M_owns)
- __throw_system_error((int)errc::resource_deadlock_would_occur);
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
else
{
_M_owns = _M_device->try_lock_until(__atime);
try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
{
if (!_M_device)
- __throw_system_error((int)errc::operation_not_permitted);
+ __throw_system_error(int(errc::operation_not_permitted));
else if (_M_owns)
- __throw_system_error((int)errc::resource_deadlock_would_occur);
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
else
{
_M_owns = _M_device->try_lock_for(__rtime);
unlock()
{
if (!_M_owns)
- __throw_system_error((int)errc::operation_not_permitted);
+ __throw_system_error(int(errc::operation_not_permitted));
else if (_M_device)
{
_M_device->unlock();