<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:19:21 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-28890] Workaround for Visual C++ standard library under /permissive-</title>
                <link>https://jira.mongodb.org/browse/SERVER-28890</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Visual C++ compiler team is improving conformance of conditional operator for the upcoming VS2017 Update 1 release (15.3). The improvements will be available under a switch, but they will also be implied by the /permissive- switch. Our QA team currently builds regularly MongoDB as a part of RWC suite and so far MongoDB been clean under /permissive-. There is one place right now that will fail to compile under upcoming /Zc:ternary:&lt;/p&gt;

&lt;p&gt;mongo\src\mongo\util\lru_cache.h(134)&lt;/p&gt;

&lt;p&gt;    const_iterator cfind(const K&amp;amp; key) const &lt;/p&gt;
{
        auto it = this-&amp;gt;_map.find(key);
        return (it == this-&amp;gt;_map.end()) ? this-&amp;gt;end() : it-&amp;gt;second; // &amp;lt;&amp;lt; Line 134
    }

&lt;p&gt;The problem is not so much in the code itself as other compilers are able to compile it without problems, but in our STL implementation that currently uses inheritance between mutable and const iterators. Stephan acknowledged the library team is planning to get rid of this trick and replace it with conformant implementation in the next major breaking release, but it&apos;s not going to happen anytime soon, while as is the above statement is ambiguous (according to the standard; note other compilers would have complained as well should they&apos;ve been using our STL implementation).&lt;/p&gt;

&lt;p&gt;We would like to ask you guys to patch the above code with an explicit cast to resolve the ambiguity caused by our current iterator implementation as following (pull request is following):&lt;/p&gt;

&lt;p&gt;    const_iterator cfind(const K&amp;amp; key) const &lt;/p&gt;
{
        auto it = this-&amp;gt;_map.find(key);
        return (it == this-&amp;gt;_map.end()) ? this-&amp;gt;end() : const_iterator(it-&amp;gt;second); // &amp;lt;&amp;lt; Line 134
    }

&lt;p&gt;This would allow us to keep building MongoDB clean under /permissive- for validating compiler changes.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;br/&gt;
Yuriy&lt;/p&gt;</description>
                <environment></environment>
        <key id="376003">SERVER-28890</key>
            <summary>Workaround for Visual C++ standard library under /permissive-</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="13201">Fixed</resolution>
                                        <assignee username="adam.martin@mongodb.com">ADAM Martin</assignee>
                                    <reporter username="solodon">Yuriy Solodkyy</reporter>
                        <labels>
                            <label>todo_in_code</label>
                    </labels>
                <created>Thu, 20 Apr 2017 20:36:21 +0000</created>
                <updated>Mon, 30 Oct 2023 23:17:19 +0000</updated>
                            <resolved>Mon, 24 Apr 2017 20:48:26 +0000</resolved>
                                                    <fixVersion>3.5.7</fixVersion>
                                    <component>Build</component>
                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="1556735" author="xgen-internal-githook" created="Mon, 24 Apr 2017 20:46:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;solodon4&apos;, u&apos;name&apos;: u&apos;Yuriy Solodkyy&apos;, u&apos;email&apos;: u&apos;yuriysol@microsoft.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-28890&quot; title=&quot;Workaround for Visual C++ standard library under /permissive-&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-28890&quot;&gt;&lt;del&gt;SERVER-28890&lt;/del&gt;&lt;/a&gt; Workaround for upcoming `/Zc:ternary`&lt;/p&gt;

&lt;p&gt;This workaround allows building MongoDB under Microsoft&apos;s upcoming&lt;br/&gt;
compiler, with the `/Zc:ternary` option enabled.  This option would&lt;br/&gt;
be implied by the `/permissive-` option.  The code fails to compile&lt;br/&gt;
under this mode when using Microsoft&apos;s existing `std::list`&lt;br/&gt;
implementation.  This explicit cast can be removed once Microsoft&apos;s&lt;br/&gt;
`std::list` stops using inheritance between const and modifiable&lt;br/&gt;
iterators.&lt;/p&gt;

&lt;p&gt;The issue arises because the `?:` ternary operator requires an&lt;br/&gt;
impossible conversion from a `const iterator &amp;amp;` to a&lt;br/&gt;
`const_iterator &amp;amp;&amp;amp;` or a `const_iterator &amp;amp;`.  This occurs because&lt;br/&gt;
Microsoft&apos;s `std::list&amp;lt; ... &amp;gt;::iterator` inherits from&lt;br/&gt;
`std::list&amp;lt; ... &amp;gt;::const_iterator`.  Were the `const iterator &amp;amp;`&lt;br/&gt;
non-constant (`iterator &amp;amp;`), this would work.  Additionally, were the&lt;br/&gt;
`const_iterator &amp;amp;` constant (`const const_iterator &amp;amp;`), this would&lt;br/&gt;
also work.&lt;/p&gt;

&lt;p&gt;Closes #1147&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/918ac217df662fcb0865dba278df9151c3665fbc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/918ac217df662fcb0865dba278df9151c3665fbc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1554200" author="solodon" created="Thu, 20 Apr 2017 21:49:43 +0000"  >&lt;p&gt;Hi Thomas,&lt;/p&gt;

&lt;p&gt;Done.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;br/&gt;
Yuriy&lt;/p&gt;</comment>
                            <comment id="1554187" author="thomas.schubert" created="Thu, 20 Apr 2017 21:42:09 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=solodon&quot; class=&quot;user-hover&quot; rel=&quot;solodon&quot;&gt;solodon&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;Thank you for the report. Would you please sign the &lt;a href=&quot;https://www.mongodb.com/legal/contributor-agreement&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;contributor agreement&lt;/a&gt; so we can consider your pull request?&lt;/p&gt;

&lt;p&gt;Thanks again,&lt;br/&gt;
Thomas&lt;/p&gt;</comment>
                            <comment id="1554111" author="solodon" created="Thu, 20 Apr 2017 20:41:16 +0000"  >&lt;p&gt;Created pull request: &lt;a href=&quot;https://github.com/mongodb/mongo/pull/1147&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/1147&lt;/a&gt; &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="935527">SERVER-43423</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 20 Apr 2017 21:42:09 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 42 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>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 42 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>adam.martin@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>solodon</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht6527:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;This is only reproducible with MS Visual C++ that is not yet released.&lt;/p&gt;</customfieldvalue>

                        </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>
                                    <customfieldvalue><![CDATA[kelsey.schubert@mongodb.com]]></customfieldvalue>
    

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

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