diff options
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/build2/variable b/build2/variable index 8fc1fb9..0480a6c 100644 --- a/build2/variable +++ b/build2/variable @@ -694,8 +694,15 @@ namespace build2 static void prepend (value&, vector<T>&&); static bool empty (const vector<T>& x) {return x.empty ();} - static const string type_name; - static const build2::value_type value_type; + // Make sure these are static-initialized together. Failed that VC will + // make sure it's done in the wrong order. + // + struct value_type_ex: build2::value_type + { + string type_name; + value_type_ex (value_type&&); + }; + static const value_type_ex value_type; }; // map<K, V> @@ -713,8 +720,15 @@ namespace build2 return append (v, move (x));} static bool empty (const map<K, V>& x) {return x.empty ();} - static const string type_name; - static const build2::value_type value_type; + // Make sure these are static-initialized together. Failed that VC will + // make sure it's done in the wrong order. + // + struct value_type_ex: build2::value_type + { + string type_name; + value_type_ex (value_type&&); + }; + static const value_type_ex value_type; }; // variable_pool |