From a35ddddac86ec62fa25c7eea605bb4abf84eb705 Mon Sep 17 00:00:00 2001 From: ras0219 <533828+ras0219@users.noreply.github.com> Date: Mon, 7 Sep 2020 16:48:46 -0700 Subject: [vcpkg] Fix compilation on VS2015 (#13398) Co-authored-by: Robert Schumacher --- toolsrc/src/vcpkg/sourceparagraph.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'toolsrc/src') diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 27861f873..e13fcfdb7 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -490,6 +490,18 @@ namespace vcpkg constexpr StringLiteral FeatureDeserializer::DESCRIPTION; constexpr StringLiteral FeatureDeserializer::DEPENDENCIES; + static constexpr StringView EXPRESSION_WORDS[] = { + "WITH", + "AND", + "OR", + }; + static constexpr StringView VALID_LICENSES[] = +#include "spdx-licenses.inc" + ; + static constexpr StringView VALID_EXCEPTIONS[] = +#include "spdx-licenses.inc" + ; + // We "parse" this so that we can add actual license parsing at some point in the future // without breaking anyone struct LicenseExpressionDeserializer : Json::IDeserializer @@ -503,18 +515,6 @@ namespace vcpkg ExpectException, }; - constexpr static StringView EXPRESSION_WORDS[] = { - "WITH", - "AND", - "OR", - }; - constexpr static StringView VALID_LICENSES[] = -#include "spdx-licenses.inc" - ; - constexpr static StringView VALID_EXCEPTIONS[] = -#include "spdx-licenses.inc" - ; - virtual Optional visit_string(Json::Reader&, StringView sv) override { Mode mode = Mode::ExpectExpression; @@ -630,10 +630,6 @@ namespace vcpkg } }; - constexpr StringView LicenseExpressionDeserializer::EXPRESSION_WORDS[]; - constexpr StringView LicenseExpressionDeserializer::VALID_LICENSES[]; - constexpr StringView LicenseExpressionDeserializer::VALID_EXCEPTIONS[]; - struct ManifestDeserializer : Json::IDeserializer> { virtual StringView type_name() const override { return "a manifest"; } -- cgit v1.2.3