<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:02:43 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-1460] Compiling with c++17 and STL features using MinGW 7.2</title>
                <link>https://jira.mongodb.org/browse/CXX-1460</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;&lt;b&gt;cmake command&lt;/b&gt;&lt;br/&gt;
&lt;em&gt;cmake -G &quot;MinGW Makefiles&quot; -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\lib\mongo-cxx-driver -DLIBBSON_DIR=c:\lib\mongo-c-driver -DLIBMONGOC_DIR=c:\lib\mongo-c-driver -DBSONCXX_POLY_USE_STD_EXPERIMENTAL=1 -DCMAKE_CXX_STANDARD=17&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;File changes to be able to compile&lt;/b&gt;&lt;br/&gt;
File src\bsoncxx\util\functor.hpp&lt;br/&gt;
Add #include &amp;lt;functional&amp;gt;&lt;/p&gt;

&lt;p&gt;File src\mongocxx\private\libbson.hh&lt;br/&gt;
Remove l.61 : explicit scoped_bson_t(bsoncxx::document::view_or_value doc);&lt;br/&gt;
Remove l.75 : void init_from_static(bsoncxx::document::view_or_value doc);&lt;br/&gt;
Remove respective impl in libbson.cpp&lt;/p&gt;

&lt;p&gt;File src\third_party\catch\include\catch.hpp&lt;br/&gt;
Comment l.823, not sure how it should be fixed, error is : &lt;em&gt;error: ISO C++ forbids comparison between pointer and integer &lt;span class=&quot;error&quot;&gt;&amp;#91;-fpermissive&amp;#93;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;</description>
                <environment>Windows 10 / mingw64 7.2</environment>
        <key id="453667">CXX-1460</key>
            <summary>Compiling with c++17 and STL features using MinGW 7.2</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="13203">Gone away</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="ads00">ads00</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 Nov 2017 08:34:14 +0000</created>
                <updated>Fri, 27 Oct 2023 19:48:14 +0000</updated>
                            <resolved>Mon, 4 Dec 2017 15:04:22 +0000</resolved>
                                    <version>3.1.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1741455" author="acm" created="Mon, 4 Dec 2017 15:04:22 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ads00&quot; class=&quot;user-hover&quot; rel=&quot;ads00&quot;&gt;ads00&lt;/a&gt; - I&apos;m closing this ticket because I believe all of the issues you identified have been addressed, either as commits under this ticket, or other miscellaneous items that were committed in the leadup to 3.2.0-rc0. I don&apos;t happen to have a Windows/MinGW environment handy, so I haven&apos;t verified this.&lt;/p&gt;

&lt;p&gt;If you do find additional issues, please feel free to open new tickets with those issues.&lt;/p&gt;</comment>
                            <comment id="1740737" author="acm" created="Sat, 2 Dec 2017 05:41:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ads00&quot; class=&quot;user-hover&quot; rel=&quot;ads00&quot;&gt;ads00&lt;/a&gt; - FYI mongocxx 3.2.0-rc0 has been released which I believe should address all of the issues you identified. If possible, could you please grab it and see if it works for you in MinGW?&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/releases/tag/r3.2.0-rc0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/releases/tag/r3.2.0-rc0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1723061" author="acm" created="Fri, 10 Nov 2017 21:44:35 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ads00&quot; class=&quot;user-hover&quot; rel=&quot;ads00&quot;&gt;ads00&lt;/a&gt; - FYI that work has been pushed to master, so you can just try master now if you like.&lt;/p&gt;</comment>
                            <comment id="1722260" author="acm" created="Fri, 10 Nov 2017 03:07:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ads00&quot; class=&quot;user-hover&quot; rel=&quot;ads00&quot;&gt;ads00&lt;/a&gt; - Could you try building with this branch and see if you can get further: &lt;a href=&quot;https://github.com/acmorrow/mongo-cxx-driver/tree/CXX-1464&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/acmorrow/mongo-cxx-driver/tree/CXX-1464&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that the changes on that branch mean that you should no longer state &lt;tt&gt;-DBSONCXX_POLY_USE_STD_EXPERIMENTAL=1&lt;/tt&gt; on your CMake configuration line: we now note that you are doing a C&amp;#43;&amp;#43;17 build and use the builtin C&amp;#43;&amp;#43;17 types for &lt;tt&gt;std::string_view&lt;/tt&gt; and &lt;tt&gt;std::optional&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="1718223" author="xgen-internal-githook" created="Mon, 6 Nov 2017 23:36:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Morrow&apos;, &apos;username&apos;: &apos;acmorrow&apos;, &apos;email&apos;: &apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1460&quot; title=&quot;Compiling with c++17 and STL features using MinGW 7.2&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1460&quot;&gt;&lt;del&gt;CXX-1460&lt;/del&gt;&lt;/a&gt; Add missing moves in scoped_bson_t&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/4f2f2baa4234649544ea181910dc1ac39b843edf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/4f2f2baa4234649544ea181910dc1ac39b843edf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1718222" author="xgen-internal-githook" created="Mon, 6 Nov 2017 23:36:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Andrew Morrow&apos;, &apos;username&apos;: &apos;acmorrow&apos;, &apos;email&apos;: &apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-1460&quot; title=&quot;Compiling with c++17 and STL features using MinGW 7.2&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-1460&quot;&gt;&lt;del&gt;CXX-1460&lt;/del&gt;&lt;/a&gt; Add missing functional header&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/48fdb2038daa61f75bb53fb80e2f8aa42b4032ac&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/48fdb2038daa61f75bb53fb80e2f8aa42b4032ac&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1717314" author="acm" created="Mon, 6 Nov 2017 01:10:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ads00&quot; class=&quot;user-hover&quot; rel=&quot;ads00&quot;&gt;ads00&lt;/a&gt; - So this is going to be a little tricky to sort out. I think part of the issue is that you just shouldn&apos;t use the std::experimental polyfills with C&amp;#43;&amp;#43;17, since it offers the real deal for &lt;tt&gt;std::string_view&lt;/tt&gt; and &lt;tt&gt;std::optional&lt;/tt&gt;. If I set things up to use that, then clang 5 and GCC 7 agree that it is ambiguous. But when using the other polyfills (MNMLSTC, boost) the overloads aren&apos;t ambiguous, and appears to in fact be necessary. Furthermore, it looks like the official C&amp;#43;&amp;#43;17 &lt;tt&gt;std::string_view&lt;/tt&gt; doesn&apos;t offer a &lt;tt&gt;std::string_view::to_string&lt;/tt&gt;, which we are currently relying on.&lt;/p&gt;

&lt;p&gt;I think then the solution is to add support for using the official C&amp;#43;&amp;#43;17 version of &lt;tt&gt;std::optional&lt;/tt&gt;, and then making the presence or absence of the overloads a compile time conditional depending on whether we are using C&amp;#43;&amp;#43;17 and the &lt;tt&gt;std&lt;/tt&gt; versions, or whether we are using the other polyfills. Additionally, we will need to fix all the callers of &lt;tt&gt;to_string&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;So, it is going to take a little work to dig out of this.&lt;/p&gt;</comment>
                            <comment id="1717108" author="acm" created="Sat, 4 Nov 2017 15:00:04 +0000"  >&lt;p&gt;OK, so, I&apos;m not sure what is right here. Clang 4 and GCC 7 disagree. If I leave the overloads in, then clang can compile it but GCC can&apos;t. If I take the overloads out, then clang can no longer compile it but GCC can.&lt;/p&gt;</comment>
                            <comment id="1715392" author="acm" created="Thu, 2 Nov 2017 14:37:54 +0000"  >&lt;p&gt;Also, please feel free to send us a pull request with the addition of the &lt;tt&gt;&amp;lt;functional&amp;gt;&lt;/tt&gt; header.&lt;/p&gt;</comment>
                            <comment id="1715390" author="acm" created="Thu, 2 Nov 2017 14:37:23 +0000"  >&lt;p&gt;I think that ambiguity is deeply subtle. Something to do with the explicitness of  the &lt;tt&gt;std::optional&lt;/tt&gt; constructors in C++17. Note that the explicit-ness of the constructors appears to be SFINAE&apos;d or similar: &lt;a href=&quot;http://en.cppreference.com/w/cpp/utility/optional/optional&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://en.cppreference.com/w/cpp/utility/optional/optional&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1714855" author="ads00" created="Wed, 1 Nov 2017 19:04:34 +0000"  >&lt;p&gt;Yes, call is ambiguous. std::optional&amp;lt;A&amp;gt; can be constructed passing an instance of A so i removed the overload with &lt;em&gt;(bsoncxx::document::view_or_value doc)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I will test catch on master when i&apos;ll have some time&lt;/p&gt;</comment>
                            <comment id="1714589" author="acm" created="Wed, 1 Nov 2017 15:27:46 +0000"  >&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The addition of &lt;tt&gt;\&amp;lt;functional\&amp;gt;&lt;/tt&gt; to &lt;tt&gt;src/bsoncxx/util/functor.hpp&lt;/tt&gt; is obviously correct&lt;/li&gt;
	&lt;li&gt;Could you please clarify why you removed the two functions from libbson.hh? Are they somehow ambiguous with the optional overloads in c++17?&lt;/li&gt;
	&lt;li&gt;Re catch, could you see if this reproduces against master? I believe catch has been upgraded since 3.1.3 and it may address this issue.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="454830">CXX-1464</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <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_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htax13:</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>