diff --git a/.github/actions/client-release/action.yml b/.github/actions/client-release/action.yml index c6084d6e1..6a07bdc41 100644 --- a/.github/actions/client-release/action.yml +++ b/.github/actions/client-release/action.yml @@ -74,7 +74,7 @@ runs: if: runner.os == 'Windows' shell: bash env: - OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }} + OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL' BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index dcf8bbf15..fcbea06d5 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -59,7 +59,7 @@ jobs: - uses: ilammy/msvc-dev-cmd@v1 - uses: ./.github/actions/ci env: - OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }} + OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL' BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3' with: diff --git a/libs/common/include/launchdarkly/attributes_builder.hpp b/libs/common/include/launchdarkly/attributes_builder.hpp index 3f959c168..bc0dc82c9 100644 --- a/libs/common/include/launchdarkly/attributes_builder.hpp +++ b/libs/common/include/launchdarkly/attributes_builder.hpp @@ -63,7 +63,9 @@ class AttributesBuilder final { AttributesBuilder& operator=(AttributesBuilder const&) = delete; AttributesBuilder& operator=(AttributesBuilder&&) = delete; - AttributesBuilder(AttributesBuilder&& builder) noexcept = default; + // This cannot be noexcept because of: + // https://developercommunity.visualstudio.com/t/bug-in-stdmapstdpair-implementation-with-move-only/840554 + AttributesBuilder(AttributesBuilder&& builder) = default; ~AttributesBuilder() = default; /** diff --git a/libs/common/include/launchdarkly/persistence/persistence.hpp b/libs/common/include/launchdarkly/persistence/persistence.hpp index 0cb027eff..6cda9802c 100644 --- a/libs/common/include/launchdarkly/persistence/persistence.hpp +++ b/libs/common/include/launchdarkly/persistence/persistence.hpp @@ -1,5 +1,7 @@ #pragma once +#include + /** * Interface for a data store that holds feature flag data and other SDK * properties in a serialized form. diff --git a/libs/common/include/launchdarkly/value.hpp b/libs/common/include/launchdarkly/value.hpp index b176d2c4e..9d3a82019 100644 --- a/libs/common/include/launchdarkly/value.hpp +++ b/libs/common/include/launchdarkly/value.hpp @@ -413,9 +413,11 @@ class Value final { enum Type type_; // Empty constants used when accessing the wrong type. - inline static const std::string empty_string_; - inline static const Array empty_vector_; - inline static const Object empty_map_; + // These are not inline static const because of this bug: + // https://developercommunity.visualstudio.com/t/inline-static-destructors-are-called-multiple-time/1157794 + static const std::string empty_string_; + static const Array empty_vector_; + static const Object empty_map_; static const Value null_value_; }; diff --git a/libs/common/src/config/app_info_builder.cpp b/libs/common/src/config/app_info_builder.cpp index 8cd6c737d..df83d2749 100644 --- a/libs/common/src/config/app_info_builder.cpp +++ b/libs/common/src/config/app_info_builder.cpp @@ -21,7 +21,13 @@ tl::expected AppInfoBuilder::Tag::Build() const { } bool ValidChar(char c) { - return std::isalnum(c) != 0 || c == '-' || c == '.' || c == '_'; + if(c > 0 && c < 255) { + // The MSVC implementation of isalnum will assert if the number it outside + // its lookup table. + // iswalnum would not, but is less restrictive than desired. + return std::isalnum(c) != 0 || c == '-' || c == '.' || c == '_'; + } + return false; } std::optional IsValidTag(std::string const& key, diff --git a/libs/common/src/value.cpp b/libs/common/src/value.cpp index bc28777fa..1db2b19a9 100644 --- a/libs/common/src/value.cpp +++ b/libs/common/src/value.cpp @@ -7,6 +7,9 @@ namespace launchdarkly { +const std::string Value::empty_string_; +const Value::Array Value::empty_vector_; +const Value::Object Value::empty_map_; const Value Value::null_value_; Value::Value() : type_(Value::Type::kNull), storage_{0.0} {}