Comments (2)
This is supported in the 3.0 series of releases. Consider backporting to 2.3.
from units.
Parts of this seems to got broken from 3.0.0 Beta to 3.0.0 Beta 2. The following code compiled on Beta, but does not compile on Beta 2 any more:
units::seconds<> s(0);
s += std::chrono::seconds(0);
The problem seems to got introduced with 26242aa where an additional overload for operator+=
with signature
template<class UnitTypeLhs, class T, std::enable_if_t<traits::is_unit_v<UnitTypeLhs> && !traits::is_unit_v<T>, int> = 0>
constexpr UnitTypeLhs& operator+=(UnitTypeLhs& lhs, T rhs) noexcept;
has been introduced. For std::chrono
types on the lhs, this operator now gets precedence and fails in finding the corresponding operator+
used in its implementation.
from units.
Related Issues (20)
- Conversion from `std::chrono::duration<double>` to `units::seconds_t` is lossy. HOT 1
- Allow `pow<E>` to do fractional powers. Possibly `pow<1,2>` would be the same as `sqrt`?
- Support for `constexpr` declaration of the Negative values with literals HOT 1
- 2.3.2 Fails to compile HOT 2
- Conan package out of date HOT 2
- Undefined references to .name() and .abbreviation() HOT 1
- Incorrect enable_if condition for operator+ HOT 1
- Request for branch and pull request permissions HOT 5
- percent_t FROM double and TO double are different HOT 9
- 2.3.3 does not compile
- Add a way to specify units when "downcasting" to numeric type HOT 2
- Support the MSFS SDK HOT 2
- Empty base class optimization for MSVC
- Does not compile with GCC 12 HOT 1
- raw() and value() is error prone HOT 4
- [Bug] i386 (32-bit) fails to compile
- Shouldn't the naming of units::torque::foot_pound be changed
- v2 -> v3 porting HOT 2
- Need help implementing resistance as a new custom unit. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from units.