<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:00:51 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-939] Non-default-constructibility of document::value frustrates common programming idioms</title>
                <link>https://jira.mongodb.org/browse/CXX-939</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;See &lt;a href=&quot;https://groups.google.com/forum/#!topic/mongodb-user/w193ViKfArU&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/#!topic/mongodb-user/w193ViKfArU&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="295006">CXX-939</key>
            <summary>Non-default-constructibility of document::value frustrates common programming idioms</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="andrew.morrow@mongodb.com">Andrew Morrow</reporter>
                        <labels>
                    </labels>
                <created>Sun, 19 Jun 2016 13:41:59 +0000</created>
                <updated>Wed, 7 Feb 2024 09:46:29 +0000</updated>
                                                                            <component>API</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="1484851" author="david.golden" created="Wed, 25 Jan 2017 13:56:42 +0000"  >&lt;p&gt;Given this has come up again, I think we need to do something more, either in the API or in the documentation to help users avoid frustration.  I&apos;m putting this into the &quot;Not Planned&quot; bucket so it&apos;s visible in our backlog, but without committing us to specific work.&lt;/p&gt;</comment>
                            <comment id="1484829" author="david.golden" created="Wed, 25 Jan 2017 13:54:50 +0000"  >&lt;p&gt;This came up again in FREE-120548 ( &lt;a href=&quot;https://groups.google.com/forum/#!topic/mongodb-user/9aCMUczSXvI&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/#!topic/mongodb-user/9aCMUczSXvI&lt;/a&gt; ).&lt;/p&gt;</comment>
                            <comment id="1362399" author="acm" created="Fri, 19 Aug 2016 18:19:44 +0000"  >&lt;p&gt;Given that no consensus has emerged, I&apos;m closing this as won&apos;t fix. Users can use stdx::optional for this use case. We can always revisit in the future. &lt;/p&gt;</comment>
                            <comment id="1342304" author="acm" created="Sat, 30 Jul 2016 17:19:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/511&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/511&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1303534" author="alb@neptunesystems.com" created="Wed, 22 Jun 2016 21:48:55 +0000"  >&lt;p&gt;With reference to the linked discussion, I think that things like exceptions and move semantics exist for reasons that are, indisputably, good ones. One can take an approach of embracing such standards, which allows consumers a choice to wrap the library implementation with something more to their liking, or one can attempt to pretend they don&apos;t exist, which is, to me, frankly, a form of collective punishment.&lt;/p&gt;

&lt;p&gt;That is, a good library exposes power and flexibility; you might choose to insulate yourself from some of the power or the flexibility, and that&apos;s your choice, but at least you can make the choice.&lt;/p&gt;

&lt;p&gt;Were it me, I&apos;d probably elect to experiment with the first choice, that is, moved-from semantics, but TBH I&apos;m not sold on the argument of needing a change here; to me, I&apos;d append &apos;of the past&apos; to the title of this issue.&lt;/p&gt;

&lt;p&gt;The examples referenced in the discussion are, for example, indicative of at best a poor understanding of exception handling &amp;#8211; if you&apos;re treating exceptions as return codes, it&apos;s not going to end well. However, allowing moved-from semantics would, seemingly, allow hoisting of the result out of the exception-protected scope without excessive cost should one wish to.&lt;/p&gt;</comment>
                            <comment id="1302849" author="acm" created="Wed, 22 Jun 2016 15:39:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alb&quot; class=&quot;user-hover&quot; rel=&quot;alb&quot;&gt;alb&lt;/a&gt; - As an early user of the driver, I would like to solicit your feedback on this issue. We are contemplating giving bsoncxx::document::value a default constructor (please see the mongodb-user group discussion in the ticket description). There would be two ways to do this:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Give a default constructed document::value &quot;moved-from&quot; semantics. The only valid operations would be to assign to it, or destroy it. Cheap, but easy for users to get wrong.&lt;/li&gt;
	&lt;li&gt;Give a default constructed document::value &quot;empty document&quot; semantics, much like a default constructed document::view. Requesting a view from a default constructed document::value would give you a view into an empty BSON document. There would be some cost to properly initialize such a document::value, and it would introduce some cost into the class to account for whether or not the underlying memory was actually owned, or referred to the static empty document.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thoughts?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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-2825</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY25Q2</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6lnb:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1065">Platforms 17 (07/15/16)</customfieldvalue>
    <customfieldvalue id="1066">Platforms 18 (08/05/16)</customfieldvalue>
    <customfieldvalue id="1227">Platforms 2016-08-26</customfieldvalue>

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