<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:23:45 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-10664] template ptr&lt;T&gt; class not const correct</title>
                <link>https://jira.mongodb.org/browse/SERVER-10664</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I was browsing the mongodb code in doxygen (I&apos;m thinking of &quot;stealing&quot; your ptr&amp;lt;T&amp;gt; class) and noticed that the operator-&amp;gt;() and operator*() (dereference) are not const correct:&lt;/p&gt;

&lt;p&gt;T* operator-&amp;gt;() const &lt;/p&gt;
{ return _p; }&lt;br/&gt;
T&amp;amp; operator*() const { return *_p; }&lt;br/&gt;
operator T* () const { return _p; }

&lt;p&gt;should be:&lt;/p&gt;

&lt;p&gt;const T* operator-&amp;gt;() const &lt;/p&gt;
{ return _p; }&lt;br/&gt;
const T&amp;amp; operator*() const { return *_p; }&lt;br/&gt;
operator const T* () const { return _p; }

&lt;p&gt;// ... and if you want non-const versions.&lt;br/&gt;
T* operator-&amp;gt;() &lt;/p&gt;
{ return _p; }&lt;br/&gt;
T&amp;amp; operator*() { return *_p; }&lt;br/&gt;
operator T* () { return _p; }

&lt;p&gt;If there is some rationale for violating the const correctness, it should at least be documented in a comment (didn&apos;t notice anything in the doxygen documentation regarding this).&lt;/p&gt;</description>
                <environment>C++ generic</environment>
        <key id="88244">SERVER-10664</key>
            <summary>template ptr&lt;T&gt; class not const correct</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="schwerin@mongodb.com">Andy Schwerin</assignee>
                                    <reporter username="mhcox">Michael H. Cox</reporter>
                        <labels>
                            <label>pull-request</label>
                    </labels>
                <created>Mon, 2 Sep 2013 21:21:28 +0000</created>
                <updated>Wed, 10 Dec 2014 23:10:38 +0000</updated>
                            <resolved>Mon, 9 Sep 2013 14:39:34 +0000</resolved>
                                    <version>2.5.2</version>
                                                    <component>Internal Code</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="420911" author="schwerin" created="Mon, 9 Sep 2013 14:39:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mhcox&quot; class=&quot;user-hover&quot; rel=&quot;mhcox&quot;&gt;mhcox&lt;/a&gt;, no sweat.  Thanks for doing the due diligence.&lt;/p&gt;</comment>
                            <comment id="418291" author="mhcox" created="Thu, 5 Sep 2013 06:00:30 +0000"  >&lt;p&gt;After reviewing how C++11 specifies shared_ptr&amp;lt;T&amp;gt; (20.7.2.2.5) and unique_ptr&amp;lt;T&amp;gt; (20.7.1.2.4) operator-&amp;gt;() and operator*(), ptr&amp;lt;T&amp;gt; is using the same design pattern and therefore is correct.  Sorry about wasting your time.&lt;/p&gt;

&lt;p&gt;At least I learned how to run the build and unit-tests as well as creating a pull request. :-}&lt;/p&gt;</comment>
                            <comment id="416428" author="mhcox" created="Tue, 3 Sep 2013 00:24:01 +0000"  >&lt;p&gt;Also ran &quot;scons smokeCppUnittests&quot; with all tests passing.&lt;/p&gt;</comment>
                            <comment id="416406" author="mhcox" created="Mon, 2 Sep 2013 23:10:34 +0000"  >&lt;p&gt;Also ran &quot;scons all&quot; and &quot;scons test&quot;.  Appeared to work successfully.  Not absolutely sure (build/moduletests.txt was empty).&lt;/p&gt;</comment>
                            <comment id="416388" author="mhcox" created="Mon, 2 Sep 2013 22:02:28 +0000"  >&lt;p&gt;Corrected const incorrectness of ptr&amp;lt;T&amp;gt; class in pull request from github.com/mhcox/mongo on branch mhcox/&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10664&quot; title=&quot;template ptr&amp;lt;T&amp;gt; class not const correct&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10664&quot;&gt;&lt;del&gt;SERVER-10664&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 9 Sep 2013 14:39:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 23 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 23 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>mhcox</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmhzj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrsmvb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>80940</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hspc1j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>