aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-fix-failed-static-assertion.patch
blob: 510e25f56a4db8f65d96e1e0e9afd6265c7d709f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Fix a following build error:

In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7:
../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|."
  static_assert(
  ^
../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here
    : AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... {
      ^
../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity<std::__1::integer_sequence<unsigned long, 0, 1>, base::internal::TypeList<base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, const long &>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, NSError *> >' requested here
  static_assert(internal::AssertBindArgsValidity<
                          ^
../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
  return base::BindRepeating(std::forward<Functor>(functor),
               ^
../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
        base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
              ^

Resurrected from https://github.com/NixOS/nixpkgs/blob/ddcf01bca6c7a7a7f096bec836a1e6a707ad473d/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch because the same problem is present in 5.12 when compiling on macOS.

--- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
+++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
@@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic(
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE,
         base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
-                   weak_ptr_factory_.GetWeakPtr(), nil));
+                   weak_ptr_factory_.GetWeakPtr(), nullptr));
   }
 }