Skip to content

Commit 055babd

Browse files
kynehcfabianbs96
andauthored
To solve the compilation errors after supporting llvm-16 (#806)
* Adjusted the ConstantEdgeFunction member templates to use trailing requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>> so Clang-llvm@16 can compile * fix the formatting * pre-commit --------- Co-authored-by: Fabian Schiebel <52407375+fabianbs96@users.noreply.github.com> Co-authored-by: Fabian Schiebel <fabian.schiebel@iem.fraunhofer.de>
1 parent 8007f90 commit 055babd

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

include/phasar/DataFlow/IfdsIde/EdgeFunctionUtils.h

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ template <typename L> struct ConstantEdgeFunction {
5252
return Value;
5353
}
5454

55-
template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
55+
template <typename ConcreteEF>
5656
[[nodiscard]] static EdgeFunction<l_t>
5757
compose(EdgeFunctionRef<ConcreteEF> This,
58-
const EdgeFunction<l_t> &SecondFunction);
58+
const EdgeFunction<l_t> &SecondFunction)
59+
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>;
5960

60-
template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
61+
template <typename ConcreteEF>
6162
[[nodiscard]] static EdgeFunction<l_t>
62-
join(EdgeFunctionRef<ConcreteEF> This,
63-
const EdgeFunction<l_t> &OtherFunction);
63+
join(EdgeFunctionRef<ConcreteEF> This, const EdgeFunction<l_t> &OtherFunction)
64+
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>;
6465

6566
[[nodiscard]] constexpr bool isConstant() const noexcept { return true; }
6667

@@ -441,10 +442,12 @@ EdgeFunction<L> EdgeIdentity<L>::join(EdgeFunctionRef<EdgeIdentity> This,
441442
}
442443

443444
template <typename L>
444-
template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
445+
template <typename ConcreteEF>
445446
EdgeFunction<L>
446447
ConstantEdgeFunction<L>::compose(EdgeFunctionRef<ConcreteEF> This,
447-
const EdgeFunction<L> &SecondFunction) {
448+
const EdgeFunction<L> &SecondFunction)
449+
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>
450+
{
448451
if (auto Default = defaultComposeOrNull(This, SecondFunction)) {
449452
return Default;
450453
}
@@ -482,10 +485,12 @@ ConstantEdgeFunction<L>::compose(EdgeFunctionRef<ConcreteEF> This,
482485
}
483486

484487
template <typename L>
485-
template <std::derived_from<ConstantEdgeFunction<L>> ConcreteEF>
488+
template <typename ConcreteEF>
486489
EdgeFunction<L>
487490
ConstantEdgeFunction<L>::join(EdgeFunctionRef<ConcreteEF> This,
488-
const EdgeFunction<l_t> &OtherFunction) {
491+
const EdgeFunction<l_t> &OtherFunction)
492+
requires std::derived_from<ConcreteEF, ConstantEdgeFunction<L>>
493+
{
489494
if (auto Default = defaultJoinOrNull<l_t>(This, OtherFunction)) {
490495
return Default;
491496
}

0 commit comments

Comments
 (0)