<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[class Widget const * const &amp;]]></title><description><![CDATA[<p dir="auto">Hi All,<br />
I know it's not the proper way to ask questions, but i don't have reference material to suport my question,</p>
<p dir="auto">What this really means</p>
<pre><code>class Widget const * const &amp;
</code></pre>
<p dir="auto">I have seen this code somewhere , not sure where....</p>
<p dir="auto">Can someone please help me understand what this stands for ?</p>
]]></description><link>https://forum.qt.io/topic/114640/class-widget-const-const</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 04:17:20 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/114640.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 May 2020 17:01:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to class Widget const * const &amp; on Tue, 12 May 2020 15:14:55 GMT]]></title><description><![CDATA[<p dir="auto">I think it might be a valid template parameter, like <code>template &lt;class Widget const * const &amp;&gt; void doSomething();</code><br />
In any case, <code>const</code> refers to the item on its left unless it has nothing on its left so it refers to the item on it's right. Then you start reading right to left. In your case it's a reference to a const pointer to a const widget.<br />
You can imagine it as <code>using cpWidget =  const Widget*</code> and then <code>const cpWidget&amp;</code>.<br />
Having said that it's not very useful as a construct given pointers and references occupy the same amount of memory so <code>const Widget* const</code> would have been identical</p>
]]></description><link>https://forum.qt.io/post/594291</link><guid isPermaLink="true">https://forum.qt.io/post/594291</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Tue, 12 May 2020 15:14:55 GMT</pubDate></item><item><title><![CDATA[Reply to class Widget const * const &amp; on Sat, 09 May 2020 18:01:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">AFAIK, this is just wrong. You either forward declare a class or you create one but that line is not valid C++.</p>
]]></description><link>https://forum.qt.io/post/593734</link><guid isPermaLink="true">https://forum.qt.io/post/593734</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 09 May 2020 18:01:03 GMT</pubDate></item></channel></rss>