<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><br></div><div>I was working on the following snippet with ARC enabled. I expected the first function to complain about needing the __bridge keyword. It did not. I could get the __bridge keyword to be required as demonstrated in the second function. I suspect the rules are quite complete on the ARC checking. I thought I would bring this case to the attention of the list in case you wanted to tighten up those rules. cf_ptr is a subclass of std::unique_ptr<> that  is tailored for CoreFoundation types. It seems that the ARC __bridge doesn't get invoked there either. I expected casting this template to give me the __bridge error since it contains a data member of type NSString*.</div><div><br></div><div><br></div><div><br></div><div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            <span style="color: #bb2ca2">typedef</span> <span style="color: #4f8187">strip_pointer</span><<span style="color: #703daa">CFStringRef</span>>::<span style="color: #4f8187">type</span> CFString;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(120, 73, 42); ">            #ifdef __OBJC__</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; "><br></div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">        <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            <span style="color: #bb2ca2">inline</span> <span style="color: #bb2ca2">void</span> copy(<span style="color: #bb2ca2">const</span> <span style="color: #703daa">NSString</span>& theValue, <span style="color: #703daa">std</span>::<span style="color: #703daa">string</span>& theTarget)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">                <span style="color: #31595d">copy</span>( (<span style="color: #bb2ca2">const</span> <span style="color: #4f8187">CFString</span>&)theValue, theTarget);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            }</div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            <span style="color: #bb2ca2">inline</span> <span style="color: #bb2ca2">void</span> copy(<span style="color: #bb2ca2">const</span> <span style="color: #703daa">NSString</span>& theValue, <span style="color: #4f8187">ustring</span>& theTarget)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">                <span style="color: #31595d">copy</span>( *(<span style="color: #bb2ca2">__bridge</span>  <span style="color: #bb2ca2">const</span> <span style="color: #703daa">CFStringRef</span>) &theValue, theTarget);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            <span style="color: #bb2ca2">inline</span> <span style="color: #bb2ca2">void</span> copy(<span style="color: #bb2ca2">const</span> <span style="color: #703daa">std</span>::<span style="color: #703daa">string</span>& theValue, <span style="color: #4f8187">cf_ptr</span><<span style="color: #703daa">NSString</span>>& theTargetSPtr )</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">                <span style="color: #31595d">copy</span>(theValue, (<span style="color: #4f8187">cf_ptr</span><<span style="color: #4f8187">CFString</span>>&) theTargetSPtr);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            }</div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">        <br class="webkit-block-placeholder"></p><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">        <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            <span style="color: #bb2ca2">inline</span> <span style="color: #bb2ca2">void</span> copy(<span style="color: #bb2ca2">const</span> <span style="color: #4f8187">ustring</span>& theValue, <span style="color: #4f8187">cf_ptr</span><<span style="color: #703daa">NSString</span>>& theTargetSPtr )</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">                <span style="color: #31595d">copy</span>(theValue, (<span style="color: #4f8187">cf_ptr</span><<span style="color: #4f8187">CFString</span>>&) theTargetSPtr);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">            }</div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">        <br class="webkit-block-placeholder"></p><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(120, 73, 42); ">            #endif</div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px; ">            <br class="webkit-block-placeholder"></p></div></body></html>