-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent dependent code generation when substituting constraints
- Loading branch information
Showing
5 changed files
with
60 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// RUN: %clang_cc1 -std=c++20 -triple=x86_64-windows-msvc -Wno-defaulted-function-deleted -fms-compatibility -fms-extensions -emit-llvm %s -o - | FileCheck %s | ||
|
||
namespace CWG2369_Regression { | ||
|
||
template <class, class Up> | ||
using compare_three_way_result_t = Up::type; | ||
|
||
struct sfinae_assign_base {}; | ||
|
||
template <class Tp> | ||
concept is_derived_from_optional = | ||
requires(Tp param) { []<class Up>(Up) {}(param); }; | ||
|
||
template <class Tp, class Up> | ||
requires(is_derived_from_optional<Up>) | ||
compare_three_way_result_t<Tp, Up> operator<=>(Tp, Up); | ||
|
||
struct RuntimeModeArgs { | ||
auto operator<=>(const RuntimeModeArgs &) const = default; | ||
sfinae_assign_base needs_admin; | ||
}; | ||
|
||
RuntimeModeArgs foo() { | ||
return {}; | ||
} | ||
|
||
// CHECK: ?foo@CWG2369_Regression@@YA?AURuntimeModeArgs@1@XZ | ||
|
||
} |