https://github.com/microsoft/STL/blob/master/stl/inc/concepts
#error Despite the presence of some Clang-related bits, this header currently does not support Clang. \
You can define _SILENCE_CLANG_CONCEPTS_MESSAGE to silence this message and acknowledge that this is unsupported.
If clang is not emitting the feature test macro claiming that they support concepts I don't think it is the right time for us to claim support for clang's implementation of concepts. (We support released versions of Clang, not trunk)
If clang is not emitting the feature test macro claiming that they support concepts I don't think it is the right time for us to claim support for clang's implementation of concepts. (We support released versions of Clang, not trunk)
Another question is that are functions like std::rotl supported in latest MSVC preview??? Does VC have __builtin macros as GCC or clang does?????
template
_NODISCARD constexpr int popcount(const _Ty _Val) noexcept {
if constexpr (sizeof(_Ty) <= sizeof(unsigned int)) {
return __builtin_popcount(_Val);
} else {
return __builtin_popcountll(_Val);
}
}
Do these functions work for VC???
D:\hg\fast_io\include\fast_io_freestanding_impl\ryu\id.h(435): error C2873: 'log2p1': symbol cannot be used in a using-declaration
D:\hg\fast_io\include\fast_io_freestanding_impl\ryu\id.h(436): error C3861: 'log2p1': identifier not found
D:\hg\fast_io\include\fast_io_freestanding_impl\ryu\id.h(451): error C3861: 'log2p1': identifier not found
I think it does not work
Those compiler builtins are not yet supported by the MSVC compiler, but will be in a future release (not VS 2019 16.5):
https://github.com/microsoft/STL/blob/da0d8cfdef750abd55e1874b81252b99934c1329/stl/inc/yvals_core.h#L953-L958
Additionally, we have implemented an upcoming renaming of log2p1() to bit_length() (specified by draft paper D1956). We've taken this unusual step to avoid a known name conflict (further renamings may happen in the future):
https://github.com/microsoft/STL/blob/da0d8cfdef750abd55e1874b81252b99934c1329/stl/inc/yvals_core.h#L142-L143
I'm going to close this issue as wontfix. When a released version of Clang fully supports concepts with the feature-test macro defined, we'll investigate activating <concepts> for Clang.
(As <bit> and <concepts> demonstrate, we support MSVC and Clang as first-class citizens, and will light up features for either of them as soon as they're ready.)
Sorry for the bump, but clang 10 binaries for Windows are out -
https://releases.llvm.org/10.0.0/tools/clang/docs/ReleaseNotes.html
I tried to compile a simple program on Windows 10, and got the same error from MSVC 14.25.28610.
Would it be feasible to add support at this time?
EDIT: If not, and pardon my noobness, where does the _SILENCE_CLANG_CONCEPTS_MESSAGE go in my code?
Thanks,
Eli
@h5rdly Visual Studio 2019 16.6 Preview 3 adds complete support for Clang 10 in the STL. _SILENCE_CLANG_CONCEPTS_MESSAGE on the command line / in your build system / VS project / in the sources before including any STL headers won't get you very far in 14.25.28610: there were a few things that needed fixing (#475, #622).
Thanks Casey! Any idea as to when it's due?
Just to be sure - with Build Tools 16.6 and Clang 10 installed, we will have concepts, std::span, basically all the latest rage Clang 10 allows except coroutines?
(I tried a yield, got denied, and read about some clash that will not be resolved..)
std::span is indeed available in VS 2019 16.6, with a fallback for non-concepts compilers (i.e. Clang 9) in its range constructors. With Clang 10, that fallback isn鈥檛 activated, so you get full support. There are std::span interface changes coming in VS 2019 16.7, see https://github.com/microsoft/STL/wiki/Changelog . (Also, 16.7 requires Clang 10, dropping support for Clang 9.)
Casey is the concepts expert, but my understanding is that our concepts implementation completely works with Clang 10. What you read about with coroutines is that our experimental implementation of the Coroutines TS does not work with Clang and never will; however, we will support Standard coroutines with Clang.
We cannot provide an ETA for VS 2019 16.6鈥檚 production release date (this policy prevents disappointment if the release date needs to change).
Just trying it out, awesome, thanks Stephan!
Is it known which MSVC release will support Standard coroutines?
Casey is the concepts expert, but my understanding is that our concepts implementation completely works with Clang 10.
Yes, that is the case. It was touch-and-go with the concepts implementation being merged to the Clang 10 branch at the 11th hour (technically after the feature freeze) but we worked closely with the Clang devs to get everything working and got bugs fixed in both products.
Is it known which MSVC release will support Standard coroutines?
No, we have nothing to announce here.