Skip to content

Commit c9175d7

Browse files
committed
fix undefined references
1 parent 4bace71 commit c9175d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

neg-tests/RemoveConstReturnByValueTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ TEST(RemoveConstReturnByValueTest_Neg, AutoRef) {
2424
// After the `const` is removed we get error: incompatible types in ternary operator: ? `const Derived` : `Base`
2525
struct Base {};
2626
struct Derived : Base {
27-
Derived();
28-
Derived(const Base&);
27+
Derived() = default;
28+
Derived(const Base& base) : Base(base) {}
2929
};
3030

31-
void UseDerived(const Derived&);
31+
void UseDerived(const Derived&) {}
3232

3333
#ifndef BC_API_CHANGED
3434
const Base GetBase() {
@@ -67,9 +67,9 @@ Val GetVal() {
6767
}
6868
#endif // !BC_API_CHANGED
6969

70-
void Ambig(double&, bool = true);
71-
void Ambig(double&, int = 0);
72-
void Ambig(const double&);
70+
void Ambig(double&, bool = true) {}
71+
void Ambig(double&, int = 0) {}
72+
void Ambig(const double&) {}
7373

7474
TEST(RemoveConstReturnByValueTest_Neg, OverloadChanged) {
7575
Ambig(GetVal().Get());

0 commit comments

Comments
 (0)