[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-05-12 Thread Kyrill Briantsev via Phabricator via cfe-commits
awson added a comment.

Now, this

  #include 
  #include 
  
  auto drop1(const std::vector& s){
return s | std::views::drop(1);
  }

when compiled against gcc's-13.1 libstdc++ spits:

  boro.cpp:5:11: error: invalid operands to binary expression ('const 
std::vector' and '_Partial<_Drop, decay_t>' (aka 
'_Partial'))
  return s | std::views::drop(1);
 ~ ^ ~~~
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\cstddef:135:3: note: candidate 
function not viable: no known conversion from 'const std::vector' to 
'byte' for 1st argument
operator|(byte __l, byte __r) noexcept
^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\bits/ios_base.h:87:3: note: 
candidate function not viable: no known conversion from 'const 
std::vector' to '_Ios_Fmtflags' for 1st argument
operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\bits/ios_base.h:130:3: note: 
candidate function not viable: no known conversion from 'const 
std::vector' to '_Ios_Openmode' for 1st argument
operator|(_Ios_Openmode __a, _Ios_Openmode __b)
^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\bits/ios_base.h:170:3: note: 
candidate function not viable: no known conversion from 'const 
std::vector' to '_Ios_Iostate' for 1st argument
operator|(_Ios_Iostate __a, _Ios_Iostate __b)
^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\ranges:887:7: note: candidate 
template ignored: constraints not satisfied [with _Self = _Partial<_Drop, 
decay_t>, _Range = const std::vector &]
operator|(_Range&& __r, _Self&& __self)
^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\ranges:885:5: note: because 
'__adaptor_invocable, const std::vector &>' evaluated to false
  && __adaptor_invocable<_Self, _Range>
 ^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\ranges:860:20: note: because 
'std::declval<_Adaptor>()(declval<_Args>()...)' would be invalid: no matching 
function for call to object of type 
'std::ranges::views::__adaptor::_Partial'
= requires { std::declval<_Adaptor>()(declval<_Args>()...); };
 ^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\ranges:896:7: note: candidate 
template ignored: constraints not satisfied [with _Lhs = std::vector, _Rhs 
= _Partial<_Drop, decay_t>]
operator|(_Lhs __lhs, _Rhs __rhs)
^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\ranges:893:16: note: because 
'derived_from, _RangeAdaptorClosure>' evaluated to false
requires derived_from<_Lhs, _RangeAdaptorClosure>
 ^
  C:\Progs\msys64\ucrt64\include\c++\13.1.0\concepts:67:28: note: because 
'__is_base_of(std::ranges::views::__adaptor::_RangeAdaptorClosure, 
std::vector)' evaluated to false
  concept derived_from = __is_base_of(_Base, _Derived)
 ^
  1 error generated.

`transform` doesn't work either.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146178/new/

https://reviews.llvm.org/D146178

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28220: provide Win32 native threading

2017-01-03 Thread Kyrill Briantsev via Phabricator via cfe-commits
awson added a comment.

You don't need #define VC_EXTRA_LEAN since:

1. VC_EXTRA_LEAN is a mistype, only VC_EXTRALEAN has some meaning in Windows 
ecosystem;
2. VC_EXTRALEAN is used *only* in MFC headers which obviously aren't used in 
clang codebase.

Thus it would be better to remove this altogether, and (perhaps) replace with 
the relevant #define WIN32_LEAN_AND_MEAN.


Repository:
  rL LLVM

https://reviews.llvm.org/D28220



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-01-08 Thread Kyrill Briantsev via Phabricator via cfe-commits
awson added a comment.

It's weird that cl.exe command-line compiler reports version 19.10.24629 and 
lives in the 14.10.24629 directory (only first 2 digits are different).

Moreover, in their explanation blogpost 

 they claim that //There’s a subdirectory in the MSVC directory with a compiler 
version number. For VS 2017 RC, that version number is 14.10.24629.//, i.e., 
they name this 14.10.24629 a "compiler version".


https://reviews.llvm.org/D28365



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits