On Sun, 7 Mar 2021 03:15:46 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:
> I saw error during jpackage compilation with VS 2019 (16.9.0) as following > (on Japanese locale): > > c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\utility(604): > error C2440: '=': '_Other' から '_Ty' に変換できません。 > with > [ > _Other=nullptr > ] > and > [ > _Ty=unsigned long > ] > c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\utility(604): > note: ネイティブの nullptr はブールに変換するか、または reinterpret_cast を使用して整数型に変換することのみが可能です > c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\memory(3423): > note: コンパイル対象の関数 テンプレート インスタンス化 '_Ty std::exchange<_Ty2,nullptr>(_Ty > &,_Other &&) noexcept(false)' のリファレンスを確認してください > with > [ > _Ty=unsigned long, > _Ty2=unsigned long, > _Other=nullptr > ] > c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\memory(3422): > note: クラス テンプ レート メンバー関数 'unsigned long > std::unique_ptr<MSIHANDLE,msi::MsiHandleDeleter>::release(void) noexcept' > のコンパイル中 > d:\github-forked\jdk\src\jdk.jpackage\windows\native\common\MsiDb.cpp(237): > note: コンパイル対象の関数 テンプレート インスタンス化 'unsigned long > std::unique_ptr<MSIHANDLE,msi::MsiHandleDeleter>::release(void) noexcept' > のリファレンスを確認してください > d:\github-forked\jdk\src\jdk.jpackage\windows\native\common\MsiDb.h(119): > note: コンパイル対象の クラ ス テンプレート インスタンス化 > 'std::unique_ptr<MSIHANDLE,msi::MsiHandleDeleter>' のリファレンスを確認してください > > `UniqueMSIHANDLE` is declared in MsiUtils.h as `unique_ptr` for `MSIHANDLE`. > `MSIHANDLE` seems to be declared as synonym for `unsigned long`, not a > pointer type. > I think `MSIHANDLE` does not need to handle as `unique_ptr` if it releases at > d'tor of the class which holds it (`Database`, `DatabaseRecord`). Marked as reviewed by asemenyuk (Committer). ------------- PR: https://git.openjdk.java.net/jdk/pull/2858