<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:12: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>[CDRIVER-1544] libbson headers cannot be consumed from C++ due to direct use of _Decimal128</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-1544</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;C++ doesn&apos;t offer a _Decimal128 type. The libbson 1.5.0-rc0 headers directly make use of this type, which means that the headers cannot be consumed by C++.&lt;/p&gt;</description>
                <environment></environment>
        <key id="316242">CDRIVER-1544</key>
            <summary>libbson headers cannot be consumed from C++ due to direct use of _Decimal128</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="bjori">Hannes Magnusson</assignee>
                                    <reporter username="andrew.morrow@mongodb.com">Andrew Morrow</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Sep 2016 18:44:00 +0000</created>
                <updated>Wed, 19 Oct 2016 14:15:29 +0000</updated>
                            <resolved>Tue, 20 Sep 2016 23:28:25 +0000</resolved>
                                    <version>1.5.0</version>
                                    <fixVersion>1.5.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1389386" author="bjori" created="Tue, 20 Sep 2016 23:44:24 +0000"  >&lt;p&gt;No idea why the commit doesn&apos;t show up here. But here it is: &lt;a href=&quot;https://github.com/mongodb/libbson/commit/4d3351c40e486f042403e9e677d8450fc4ed353e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/4d3351c40e486f042403e9e677d8450fc4ed353e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1384679" author="bjori" created="Wed, 14 Sep 2016 20:29:16 +0000"  >&lt;p&gt;We should probably just remove these functions.&lt;br/&gt;
They are causing more troubles then they are worth.&lt;/p&gt;

&lt;p&gt;Our bson_decimal_t emulates BID, and can be casted to the native _Decimal128 type if it is BID encoded.&lt;/p&gt;

&lt;p&gt;They aren&apos;t really all that benefitial. If your _Decimal128 type is BID encoded, then you can do the cast yourself.&lt;br/&gt;
If your _Decimal128 is DPD encoded, then these functions won&apos;t be defined and there is nothing we can currently do for you.&lt;/p&gt;

&lt;p&gt;I suppose in the future we should add &lt;tt&gt;bson_decimal128_to_dpd&lt;/tt&gt; and &lt;tt&gt;bson_decimal128_to_bid&lt;/tt&gt; instead.&lt;/p&gt;</comment>
                            <comment id="1384633" author="acm" created="Wed, 14 Sep 2016 19:49:16 +0000"  >&lt;p&gt;This is actually worse than we originally thought. It should be legal to compile the C driver with GCC (in which case the configure check will determine that &amp;#95;Decimal128 is available), but consume the headers for that built version of the driver with clang (also in C mode), in which case, &amp;#95;Decimal128 is perhaps not available. Or, for that matter, an older GCC than offers &amp;#95;Decimal128. I think that the conversion functions need to default invisible and opt in by a consumer preprocessor definition, like LIBBSON_ENABLE__DECIMAL128_UTILITIES, which will expose those functions, iff the driver was built with Decimal support. Basically, you can&apos;t emit these functions on the basis of the configure check.&lt;/p&gt;</comment>
                            <comment id="1384617" author="jason.carey" created="Wed, 14 Sep 2016 19:40:49 +0000"  >&lt;p&gt;The smart thing here is probably just to exclude the inline conversion functions ifdef __cplusplus&lt;/p&gt;

&lt;p&gt;C++ will want the non-standard std::decimal::decimal128, which is a class wrapped around a float _&lt;em&gt;attribute&lt;/em&gt;_((mode(TD))).  So there isn&apos;t a one to one correspondence.  There&apos;s the same underlying scalar type (and the C++ class can be constructed from the scalar), but I&apos;m not sure it&apos;s worth the trouble for you.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="316249">CXX-1033</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="274980">CDRIVER-1176</issuekey>
        </issuelink>
                            </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hspqw7:</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>