Address error C2512 when compiling with Visual Studio#676
Conversation
Codecov Report
@@ Coverage Diff @@
## master #676 +/- ##
==========================================
+ Coverage 70.62% 70.62% +<.01%
==========================================
Files 372 372
Lines 43564 43565 +1
==========================================
+ Hits 30768 30769 +1
Misses 12796 12796
Continue to review full report at Codecov.
|
a697bee to
7c61d9c
Compare
|
I agree that the error seems to be in VS2019 (especially as earlier versions mostly work, although there was a related issue in VS2017 that was fixed in 8502d18). I'm wondering whether the better fix here is to explicitly implement a default constructor and remove the default argument from the existing constructor, with a note that this is done as a workaround for an issue with VS2019. I suggest this both because for any future use of the |
b9f7a2f to
fdd243c
Compare
|
Valid point, especially as a permanent fix is trivial. Done. |
Using a default value, VS2019 (VC 14.1) complains about a missing default constructor for UnitSystem.
fdd243c to
01fcfc6
Compare
speth
left a comment
There was a problem hiding this comment.
Good use of a C++11 delegating constructor.
Please fill in the issue number this pull request is fixing:
Fixes #670
Changes proposed in this pull request:
UnitSytem U({});instead ofUnitSystem U;.