Skip to content

Commit

Permalink
'Fix' weird Win64 issue with ranges-library.
Browse files Browse the repository at this point in the history
The file 'subrange.hpp' of the ranges library wouldn't compile properly on Windows, work around this strange limitation.

part of CURA-11364
  • Loading branch information
rburema committed Nov 22, 2023
1 parent d020d0f commit 67eb8e0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <range/v3/algorithm/contains.hpp>
#include <range/v3/range/conversion.hpp>
#include <range/v3/view/take_while.hpp>

#include "utils/format/filesystem_path.h"
#endif
Expand Down Expand Up @@ -80,14 +79,7 @@ int main(int argc, char** argv)
spdlog::info("Sentry config path: {}", config_path);
sentry_options_set_database_path(options, std::filesystem::absolute(config_path).generic_string().c_str());
constexpr std::string_view cura_engine_version{ CURA_ENGINE_VERSION };
const auto version = semver::from_string(
cura_engine_version
| ranges::views::take_while(
[](const auto& c)
{
return c != '+';
})
| ranges::to<std::string>);
const auto version = semver::from_string(cura_engine_version.substr(0, cura_engine_version.find_first_of('+')));
if (ranges::contains(cura_engine_version, '+') || version.prerelease_type == semver::prerelease::alpha)
{
// Not a production build
Expand Down

0 comments on commit 67eb8e0

Please sign in to comment.