You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clang tool on Windows uses clang-cl, which uses the MSVC library, and the <source_location> header contains this:
#pragma once
#ifndef _SOURCE_LOCATION_
#define_SOURCE_LOCATION_
#include<yvals_core.h>
#if _STL_COMPILER_PREPROCESSOR
#ifndef __cpp_consteval
_EMIT_STL_WARNING(STL4038, "The contents of <source_location> are available only with C++20 consteval support.");
#else// ^^^ !defined(__cpp_consteval) / defined(__cpp_consteval) vvv
If I pass /D__cpp_consteval then source_location is there. As consteval is supported in Clang with C++20, should clang-cl tooling automatically set this define?
This is possibly related to #59689 where _CRT_USE_BUILTIN_OFFSETOF is not defined in a clang-cl tool.
The text was updated successfully, but these errors were encountered:
danakj
changed the title
[Clang-CL] source_location is not available in clang-cl /std:c++20
[Clang-CL] source_location is not available in clang-cl tool with /std:c++20
Jan 28, 2023
A clang tool on Windows uses clang-cl, which uses the MSVC library, and the
<source_location>
header contains this:If I pass
/D__cpp_consteval
then source_location is there. As consteval is supported in Clang with C++20, should clang-cl tooling automatically set this define?This is possibly related to #59689 where
_CRT_USE_BUILTIN_OFFSETOF
is not defined in a clang-cl tool.The text was updated successfully, but these errors were encountered: