Skip to content

Commit 9f81069

Browse files
committed
refactor: work around string conversion warning
1 parent 52a2798 commit 9f81069

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

include/cpp2util.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ class out {
615615
*t = T(CPP2_FORWARD(args)...);
616616
}
617617
else {
618-
Default.expects(!"attempted to copy assign, but copy assignment is not available");
618+
Default.expects(false, "attempted to copy assign, but copy assignment is not available");
619619
}
620620
}
621621
else {
@@ -625,7 +625,7 @@ class out {
625625
dt->value() = T(CPP2_FORWARD(args)...);
626626
}
627627
else {
628-
Default.expects(!"attempted to copy assign, but copy assignment is not available");
628+
Default.expects(false, "attempted to copy assign, but copy assignment is not available");
629629
}
630630
}
631631
else {
@@ -642,7 +642,7 @@ class out {
642642
*t = T{CPP2_FORWARD(args)...};
643643
}
644644
else {
645-
Default.expects(!"attempted to copy assign, but copy assignment is not available");
645+
Default.expects(false, "attempted to copy assign, but copy assignment is not available");
646646
}
647647
}
648648
else {
@@ -652,7 +652,7 @@ class out {
652652
dt->value() = T{CPP2_FORWARD(args)...};
653653
}
654654
else {
655-
Default.expects(!"attempted to copy assign, but copy assignment is not available");
655+
Default.expects(false, "attempted to copy assign, but copy assignment is not available");
656656
}
657657
}
658658
else {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
clang version 16.0.6 (https://github.com/llvm/llvm-project.git 7cbf1a2591520c2491aa35339f227775f4d3adf6)
2+
Target: x86_64-pc-linux-gnu
3+
Thread model: posix
4+
InstalledDir: /home/johel/root/clang-16/bin
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bounds safety violation: out of bounds access attempt detected
2+
libc++abi: terminating
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Bounds safety violation
2+
libc++abi: terminating
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Contract violation: fill: value must contain at least count elements
2+
libc++abi: terminating
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello Fred with UFCS!

0 commit comments

Comments
 (0)