File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ This is not a comprehensive list of changes but rather a hand-curated collection
8
8
9
9
v4.6
10
10
=====
11
+ - Move BoolLike class outside of template Array class for the ` VS 17.14 ` linker (#4081 )
11
12
12
13
13
14
v4.5.2
Original file line number Diff line number Diff line change 44
44
45
45
namespace OpenSim {
46
46
47
+ // Not intended for end users => private
48
+ namespace detail {
49
+ // backwards-compat hack: the original implementation allows for references
50
+ // to booleans, which won't work if using std::vector<bool> specialization
51
+ // Moved outside the template class to ensure linking works properly in VS 17.14
52
+ // See issue (#4081) for details.
53
+ class BoolLike final {
54
+ public:
55
+ BoolLike (bool value_) : value{value_} {}
56
+ operator bool & () { return value; }
57
+ operator const bool & () const { return value; }
58
+ private:
59
+ bool value;
60
+ };
61
+ }
62
+
47
63
/* *
48
64
* A class for storing an array of values of type T. The capacity of the class
49
65
* grows as needed. To use this template for a class of type T, class T should
@@ -575,19 +591,9 @@ class Array {
575
591
private:
576
592
T _defaultValue;
577
593
578
- // backwards-compat hack: the original implementation allows for references
579
- // to booleans, which won't work if using std::vector<bool> specialization
580
- class BoolLike final {
581
- public:
582
- BoolLike (bool value_) : value{value_} {}
583
- operator bool & () { return value; }
584
- operator const bool & () const { return value; }
585
- private:
586
- bool value;
587
- };
588
594
using storage = std::conditional_t <
589
595
std::is_same<T, bool >::value,
590
- std::vector<BoolLike>,
596
+ std::vector<detail:: BoolLike>,
591
597
std::vector<T>
592
598
>;
593
599
You can’t perform that action at this time.
0 commit comments