Jim Blandy於 2016年4月28日星期四 UTC+8下午1時51分15秒寫道: > I don't really think it's a good example. TakeMediaIfKnown is accepting a > UniquePtr<MediaFile> as an inout parameter: it uses, and may modify, its > value. It should take UniquePtr<MediaFile> &. IIUC, UniquePtr<T> can't be an inout parameter for its unique semantics which owns sole ownership of an object. The caller won't be able to use the object in a meaningful way after the function returns. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
- Re: Static analysis for "use-after-move"? Gerald Squelart
- Re: Static analysis for "use-after-move"? Gerald Squelart
- Re: Static analysis for "use-after-move"... Ehsan Akhgari
- Re: Static analysis for "use-after-move"? Ehsan Akhgari
- Re: Static analysis for "use-after-move"? Gerald Squelart
- Re: Static analysis for "use-after-move"... Xidorn Quan
- Re: Static analysis for "use-after-move"... Ehsan Akhgari
- Re: Static analysis for "use-after-move&... Xidorn Quan
- Re: Static analysis for "use-after-move&... Jim Blandy
- Re: Static analysis for "use-after-move&... Karl Tomlinson
- Re: Static analysis for "use-after-move&... jwwang
- Re: Static analysis for "use-after-m... Jim Blandy
- Re: Static analysis for "use-after-m... Michael Layzell
- Re: Static analysis for "use-after-m... Gerald Squelart
- Re: Static analysis for "use-after-m... Gerald Squelart
- Re: Static analysis for "use-after-m... Jim Blandy
- Re: Static analysis for "use-after-m... Gerald Squelart
- Re: Static analysis for "use-after-m... Jason Orendorff
- Re: Static analysis for "use-after-m... Gerald Squelart
- Re: Static analysis for "use-after-m... Jim Blandy
- Re: Static analysis for "use-after-move"... Gerald Squelart