Skip to content

Compilation error with MSVC 19.37 #140

Description

@cschreib

From https://github.com/snitch-org/snitch/actions/runs/6781475887/job/18431859675.

The Windows pipeline worked fine last week, with MSVC 19.35.32217.1.
Now, running the CI pipeline with MSVC 19.37.32825.0, we get this:

D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(36,1): error C7595: 'std::_Literal_zero::_Literal_zero': call to immediate function is not a constant expression [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(36,1): message : failure was caused by a read of a variable outside its lifetime [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(36,1): message : see usage of 'rhs' [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(156,30): message : see reference to function template instantiation 'bool snitch::impl::operator_not_equal::operator ()<T,U>(const T &,const U &) noexcept const' being compiled [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
          with
          [
              T=std::strong_ordering,
              U=int
          ]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(151,26): message : while compiling class template member function 'snitch::impl::expression snitch::impl::extracted_binary_expression<true,T,snitch::impl::operator_not_equal,int>::to_expression(void) noexcept const' [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
          with
          [
              T=std::strong_ordering
          ]
D:\a\snitch\snitch\tests\runtime_tests\check.cpp(544,13): message : see the first reference to 'snitch::impl::extracted_binary_expression<true,T,snitch::impl::operator_not_equal,int>::to_expression' in 'DOCTEST_ANON_FUNC_81' [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
          with
          [
              T=std::strong_ordering
          ]
D:\a\snitch\snitch\tests\runtime_tests\check.cpp(544,13): message : see reference to class template instantiation 'snitch::impl::extracted_binary_expression<true,T,snitch::impl::operator_not_equal,int>' being compiled [D:\a\snitch\snitch\build\tests\snitch_runtime_tests.vcxproj]
          with
          [
              T=std::strong_ordering
          ]
  cli.cpp
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(36,1): error C7595: 'std::_Literal_zero::_Literal_zero': call to immediate function is not a constant expression [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(36,1): message : failure was caused by a read of a variable outside its lifetime [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(36,1): message : see usage of 'rhs' [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(156,30): message : see reference to function template instantiation 'bool snitch::impl::operator_not_equal::operator ()<T,U>(const T &,const U &) noexcept const' being compiled [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
          with
          [
              T=std::strong_ordering,
              U=int
          ]
D:\a\snitch\snitch\include\snitch/snitch_expression.hpp(151,26): message : while compiling class template member function 'snitch::impl::expression snitch::impl::extracted_binary_expression<true,T,snitch::impl::operator_not_equal,int>::to_expression(void) noexcept const' [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
          with
          [
              T=std::strong_ordering
          ]
D:\a\snitch\snitch\tests\runtime_tests\check.cpp(544,13): message : see the first reference to 'snitch::impl::extracted_binary_expression<true,T,snitch::impl::operator_not_equal,int>::to_expression' in 'test_fun_34' [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
          with
          [
              T=std::strong_ordering
          ]
D:\a\snitch\snitch\tests\runtime_tests\check.cpp(544,13): message : see reference to class template instantiation 'snitch::impl::extracted_binary_expression<true,T,snitch::impl::operator_not_equal,int>' being compiled [D:\a\snitch\snitch\build\tests\snitch_runtime_tests_self.vcxproj]
          with
          [
              T=std::strong_ordering
          ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    not our bugMisuse of the library, or someone else's bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions