Browse Source

Fix test compilation on GCC caused by missing static_cast

master
Jessica James 3 years ago
parent
commit
bd5de3fd38
  1. 2
      src/test/http_query.cpp
  2. 2
      src/test/unicode_sequence.cpp

2
src/test/http_query.cpp

@ -25,7 +25,7 @@ using namespace std::literals;
// Compile-time tests for constexpr on compilers which support C++20 constexpr std::string
#ifdef __cpp_lib_constexpr_string
constexpr std::string query_constexpr(std::string_view in_expression) {
std::string result{ in_expression };
std::string result{ static_cast<std::string>(in_expression) };
jessilib::deserialize_http_query(result);
return result;
}

2
src/test/unicode_sequence.cpp

@ -26,7 +26,7 @@ using namespace std::literals;
// Compile-time tests for constexpr on compilers which support C++20 constexpr std::string
#ifdef __cpp_lib_constexpr_string
constexpr std::string cpp_constexpr(std::string_view in_expression) {
std::string result{ in_expression };
std::string result{ static_cast<std::string>(in_expression) };
jessilib::apply_cpp_escape_sequences(result);
return result;
}

Loading…
Cancel
Save