<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">You can do this if you <i class="">don't</i> write '&', which incorporates the caveat that you're not passing a stable address. But please file a bug anyway, because the diagnostic should <i class="">tell</i> you that!<div class=""><br class=""></div><div class="">Jordan</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 16, 2018, at 13:10, Rick Mann via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Is it not possible for Swift to treat C API const pointers as something that can take let arguments?<br class=""><br class=""><br class="">LGS_EXPORT bool lgs_notify(struct lgs_context_t* ctx, const lgs_notify_params_t* params);<br class="">.<br class="">.<br class="">.<br class="">let p = lgs_notify_params_t(...)<br class="">lgs_notify(self.ctx, &p)<br class=""> ^Cannot pass immutable value as inout argument: 'p' is a 'let' constant<br class=""><br class=""><br class="">Why isn't the "const" in the C declaration enough to let Swift know it's const and just allow it to be a let?<br class=""><br class="">-- <br class="">Rick Mann<br class=""><a href="mailto:rmann@latencyzero.com" class="">rmann@latencyzero.com</a><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-users mailing list<br class="">swift-users@swift.org<br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></div></blockquote></div><br class=""></div></body></html>