Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
760 Discussions

icx 2025 fails to compile std::tie with latest msvc with `/std:c++latest`

PavelP
Beginner
238 Views

This code reproduces the error:

 

 

#include <tuple>
#include <string>

struct test
{
    double value;
    std::string name;

    bool operator<(test const& rhs) const noexcept
    {
      return std::tie(value, name) < std::tie(rhs.value, rhs.name);
    }
};

 

 

this is the error:

```

1>In file included from D:\work-pps\tuple-test\tuple-test.cpp:2:
1>d:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\tuple(196,101): : error : pack expansion contains parameter packs '_TTypes' and '_Indices' that have different lengths (1 vs. 2)
1> 196 | (requires { typename _Synth_three_way_result<_TTypes, tuple_element_t<_Indices, _UTuple>>; } && ...)
1> | ~~~~~~~ ~~~~~~~~ ^
1>d:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\tuple(202,1): note: while checking constraint satisfaction for class template partial specialization '_Three_way_comparison_result_with_tuple_like<const std::basic_string<char> &, std::tuple<const double &, const std::basic_string<char> &>, 0ULL, 1ULL>' required here
1> 202 | using _Three_way_comparison_result_with_tuple_like_t =
1> | ^~~~~
1>d:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\tuple(202,1): note: during template argument deduction for class template partial specialization '_Three_way_comparison_result_with_tuple_like<tuple<_TTypes...>, _UTuple, index_sequence<_Indices...>>' [with _TTypes = <const std::basic_string<char> &>, _UTuple = std::tuple<const double &, const std::basic_string<char> &>, _Indices = <0, 1>]
1>d:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\tuple(202,1): note: in instantiation of template class 'std::_Three_way_comparison_result_with_tuple_like<std::tuple<const std::basic_string<char> &>, std::tuple<const double &, const std::basic_string<char> &>>' requested here
1>d:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.44.34918\include\tuple(784,12): note: in instantiation of template type alias '_Three_way_comparison_result_with_tuple_like_t' requested here
1> 784 | -> _Three_way_comparison_result_with_tuple_like_t<tuple, _Other> {
1> | ^
1>D:\work-pps\tuple-test\tuple-test.cpp(12,38): note: while substituting deduced template arguments into function template 'operator<=>' [with _Other = tuple<const double &, const basic_string<char, char_traits<char>, allocator<char>> &>]
1> 12 | return std::tie(value, name) < std::tie(rhs.value, rhs.name);

```

 

FYI, this was fixed like a year ago in clang: https://github.com/llvm/llvm-project/issues/103644

My msvc version: `Version 17.14.0 Preview 2.0`

icx version: `Intel(R) oneAPI DPC++/C++ Compiler 2025.0.4 (2025.0.4.20241205)`

 

0 Kudos
1 Solution
Sravani_K_Intel
Moderator
187 Views

Hi,

MSVC Version 17.14.0 Preview 2.0  was released recently in March, while the ICX version you have is from December. Can you try upgrading to the latest compiler release 2025.1 and testing again?

View solution in original post

0 Kudos
2 Replies
Sravani_K_Intel
Moderator
188 Views

Hi,

MSVC Version 17.14.0 Preview 2.0  was released recently in March, while the ICX version you have is from December. Can you try upgrading to the latest compiler release 2025.1 and testing again?

0 Kudos
PavelP
Beginner
147 Views

I think there is something wrong with VS extensions for intel c++ compiler. It doesn't show me that there is an updated version available. It was showing that I had 2025.0 version in extension manager. I had to search for intel c++ compiler, and there was am extension for c++ 2025.1. I installed it, now my test case for tuple compiles with no errors, and the existing extension is now shown as 2025.1.

 

 

0 Kudos
Reply