<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:03:19 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>[CXX-1613] Error compiling on MSVC with C++17 as target</title>
                <link>https://jira.mongodb.org/browse/CXX-1613</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;On mongo-cxx-driver/src/bsoncxx/stdx/make_unique.hpp, when building with MSVC targeted for C++17, we have an error, because of MSVC problem with &lt;a href=&quot;https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;__cplusplus variable&lt;/a&gt;&#160;. Because of that, we get the error &quot;Cannot find a valid polyfill for make_unique&quot;.&lt;/p&gt;

&lt;p&gt;To fix this, we can either:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Use&#160;#elif defined(BSONCXX_POLY_USE_STD) instead of the current #elif __cplusplus &amp;gt;= 201402L&lt;/li&gt;
	&lt;li&gt;On CmakeLists.txt add the &quot;/Zc:__cplusplus&quot; to the target_compile_options if the compiler is MSVC and C++17 is ON as a polyfill.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="572934">CXX-1613</key>
            <summary>Error compiling on MSVC with C++17 as target</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="mpoeira">Miguel Cunha</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Jul 2018 15:58:38 +0000</created>
                <updated>Sat, 28 Oct 2023 11:27:25 +0000</updated>
                            <resolved>Tue, 27 Nov 2018 20:22:26 +0000</resolved>
                                                    <fixVersion>3.5.0</fixVersion>
                                    <component>BSON</component>
                    <component>Documentation</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2073295" author="kevin.albertson" created="Tue, 27 Nov 2018 20:22:20 +0000"  >&lt;p&gt;&lt;a href=&quot;http://mongocxx.org/mongocxx-v3/installation/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;The installation docs&lt;/a&gt; have been updated to include instructions for building with VS 2017 with C++17 standard (bottom of Step 4). To do so, configure cmake with &lt;tt&gt;-DCMAKE_CXX_FLAGS=&quot;/Zc:__cplusplus&quot;&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="2073232" author="xgen-internal-githook" created="Tue, 27 Nov 2018 19:47:33 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Kevin Albertson&apos;, &apos;email&apos;: &apos;kevin.albertson@10gen.com&apos;, &apos;username&apos;: &apos;kevinAlbs&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1613&quot; title=&quot;Error compiling on MSVC with C++17 as target&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1613&quot;&gt;&lt;del&gt;CXX-1613&lt;/del&gt;&lt;/a&gt; Update docs for VS2017 configuration&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/a79cb20c979dca59bd5ad00c912d0cc0037bdbcf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/a79cb20c979dca59bd5ad00c912d0cc0037bdbcf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2031568" author="acm" created="Fri, 12 Oct 2018 16:23:45 +0000"  >&lt;p&gt;OK. I think my preference would really be to make no changes, but to add to our documentation a note that if you want to use C+&lt;ins&gt;17 with MSVC 2017&lt;/ins&gt;, you need to add &lt;tt&gt;/Zc:__cplusplus&lt;/tt&gt; to your C++ flags in your CMake invocation, by one mechanism or another. I expect that at some point CMake will know to do this automatically when &lt;tt&gt;CMAKE_CXX_STANDARD&lt;/tt&gt; is set to C++17 and MSVC 2017 is in use, and I&apos;d rather not clutter our code with workarounds for something that can be addressed by passing a flag on the command line.&lt;/p&gt;</comment>
                            <comment id="2031534" author="kevin.albertson" created="Fri, 12 Oct 2018 16:05:05 +0000"  >&lt;p&gt;Not AFAICT. I&apos;ve seen &lt;a href=&quot;https://github.com/foonathan/compatibility/blob/master/cpp14_lib/make_unique.cmake&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;other solutions to checking for make_unique&lt;/a&gt; that test compiling a small file with make_unique to see if it&apos;s supported by the compiler via &lt;a href=&quot;https://cmake.org/cmake/help/latest/module/CheckCXXSourceCompiles.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;check_cxx_source_compiles&lt;/a&gt;. CMake can also include &lt;a href=&quot;https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;feature test macros&lt;/a&gt;, but none for make_unique.&lt;/p&gt;</comment>
                            <comment id="2031383" author="acm" created="Fri, 12 Oct 2018 15:25:00 +0000"  >&lt;p&gt;Are we sure that the CMake maintainers haven&apos;t addressed this already somehow?&lt;/p&gt;</comment>
                            <comment id="2029722" author="kevin.albertson" created="Wed, 10 Oct 2018 23:53:11 +0000"  >&lt;p&gt;Thanks for the report &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mpoeira&quot; class=&quot;user-hover&quot; rel=&quot;mpoeira&quot;&gt;mpoeira&lt;/a&gt;! We&apos;re investigating the solutions you proposed.&lt;/p&gt;</comment>
                            <comment id="2009656" author="kevin.albertson" created="Thu, 20 Sep 2018 19:02:28 +0000"  >&lt;p&gt;Related PR &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/624&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/624&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CXX-1675</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|httklb:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>