From fc1a5e0b0f7ba30f27d29c5a17af81fe6d8e86cf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Feb 2017 12:03:15 +0200 Subject: Make GCC 4.9, VC14 happy --- build2/target | 2 +- build2/test/script/parser | 2 +- build2/test/script/parser.cxx | 2 +- build2/variable | 12 ++++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/build2/target b/build2/target index 2e13e69..c5047d2 100644 --- a/build2/target +++ b/build2/target @@ -486,7 +486,7 @@ namespace build2 // // Note that the recipe may modify (mutable) the data. // - static constexpr size_t data_size = sizeof (string) * 4; + static constexpr size_t data_size = sizeof (string) * 8; mutable std::aligned_storage::type data_pad; mutable void (*data_dtor) (void*) = nullptr; diff --git a/build2/test/script/parser b/build2/test/script/parser index d5e721f..cb51042 100644 --- a/build2/test/script/parser +++ b/build2/test/script/parser @@ -146,7 +146,7 @@ namespace build2 uint64_t end_column; parsed_doc (string, uint64_t line, uint64_t column); - parsed_doc (regex_lines, uint64_t line, uint64_t column); + parsed_doc (regex_lines&&, uint64_t line, uint64_t column); parsed_doc (parsed_doc&&); // Note: move constuctible-only type. ~parsed_doc (); }; diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx index 9d926fa..59580a3 100644 --- a/build2/test/script/parser.cxx +++ b/build2/test/script/parser.cxx @@ -3278,7 +3278,7 @@ namespace build2 } parser::parsed_doc:: - parsed_doc (regex_lines r, uint64_t l, uint64_t c) + parsed_doc (regex_lines&& r, uint64_t l, uint64_t c) : regex (move (r)), re (true), end_line (l), end_column (c) { } diff --git a/build2/variable b/build2/variable index 10f4ac9..0f90c48 100644 --- a/build2/variable +++ b/build2/variable @@ -1211,6 +1211,18 @@ namespace build2 // const variable_map* stem_vars = nullptr; size_t stem_version = 0; + + // For GCC 4.9. + // + entry_type () = default; + entry_type (variable_map::value_data val, + size_t ver, + const variable_map* svars, + size_t sver) + : value (move (val)), + version (ver), + stem_vars (svars), + stem_version (sver) {} }; using map_type = std::map; -- cgit v1.1