Re: [Boost-bugs] [Boost C++ Libraries] #10089: constexpr support in units

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10089: constexpr support in units
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-10 20:39:46


#10089: constexpr support in units
--------------------------------------+---------------------------
  Reporter: gonzalobg88@… | Owner: Jürgen Hunold
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: units
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+---------------------------

Comment (by anonymous):

 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:

 constexpr quantity<time> secs_4 = 4*seconds;
 constexpr quantity<time> secs_2 = 2*seconds;
 constexpr int array_size = static_cast<int>(secs_4/secs_2);
 int an_array[array_size];

 I also converting everything to "static const" instead of constexpr, but
 that didn't work either.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/10089#comment:7>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-01-10 20:44:02 UTC