Boost C++ Libraries: Ticket #10089: constexpr support in units https://svn.boost.org/trac10/ticket/10089 <p> There is currently no support for using units and quantities within constexpr functions. Annotating the constructors and operators with BOOST_CONSTEXPR where possible should be enough to allow this. </p> <p> I can provide a partial patch that enables constexpr support for the parts of the library that I'm using. Should I use trac or send a pull-request? The later is preferable for me. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10089 Trac 1.4.3 anonymous Tue, 03 Jun 2014 11:30:49 GMT <link>https://svn.boost.org/trac10/ticket/10089#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10089#comment:1</guid> <description> <p> I've submitted a pull-request here: github.com/boostorg/units/pull/1 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jürgen Hunold</dc:creator> <pubDate>Wed, 05 Nov 2014 14:20:33 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/10089#comment:2 https://svn.boost.org/trac10/ticket/10089#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Matthias Schabel</span> to <span class="trac-author">Jürgen Hunold</span> </li> </ul> Ticket lou_langholtz@… Fri, 18 Nov 2016 00:56:54 GMT <link>https://svn.boost.org/trac10/ticket/10089#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10089#comment:3</guid> <description> <p> Boost 1.62.0 doesn't appear to support constexpr in the units library yet this request was opened 2 years ago. Why the delay in supporting constexpr in the units library? What can I do to help this along? </p> </description> <category>Ticket</category> </item> <item> <author>gonzalobg88@…</author> <pubDate>Fri, 18 Nov 2016 09:32:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10089#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10089#comment:4</guid> <description> <p> This feature would be nice to have, but nobody has had time to do it "with Boost quality" yet. </p> <p> I wrote a patch back then, but it was very rough, introduced some problems, and I didn't have time to work on it anymore. </p> <p> You can check the pull-request on github, go through the comments/discussion, and try to improve it. </p> <p> If you need help, I can give you feedback. </p> </description> <category>Ticket</category> </item> <item> <author>lou_langholtz@…</author> <pubDate>Sun, 20 Nov 2016 00:26:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10089#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10089#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10089#comment:4" title="Comment 4">gonzalobg88@…</a>: </p> <blockquote class="citation"> <p> This feature would be nice to have, but nobody has had time to do it "with Boost quality" yet. </p> </blockquote> <p> Does this assessment include the pull request by muggenhor on Aug 14? <a class="ext-link" href="https://github.com/boostorg/units/pull/22"><span class="icon">​</span>https://github.com/boostorg/units/pull/22</a> </p> <blockquote class="citation"> <p> ...You can check the pull-request on github, go through the comments/discussion, and try to improve it. </p> </blockquote> <p> Thank you. Started looking on github and found muggenhor's request that I linked above. Looks like his pull request is open while yours got closed. There is no one assigned to muggenhor's request nor labels/milestone however. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 30 Jan 2017 03:50:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10089#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10089#comment:6</guid> <description> <p> I don't see any comments on the PR, what needs to be done to get it merged? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 10 Jan 2018 20:39:45 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10089#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10089#comment:7</guid> <description> <p> This would be really nice to have this. Without it, you can't specify array sizes based on math done with "units". ex, I can't do this: </p> <p> constexpr quantity&lt;time&gt; secs_4 = 4*seconds; constexpr quantity&lt;time&gt; secs_2 = 2*seconds; constexpr int array_size = static_cast&lt;int&gt;(secs_4/secs_2); int an_array[array_size]; </p> <p> I also converting everything to "static const" instead of constexpr, but that didn't work either. </p> </description> <category>Ticket</category> </item> </channel> </rss>