-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
For this MWE I modified TestTemplate2
namespace N {
template<typename T>
class A {
public:
A(): a(0){}
T getval(){ return a;}
void setval(const T& val){ a = val; }
T& operator[](int i) { return a; }
T a;
};
template class A<int>;
void g(A<int>& a) { }
class B {
public:
void f(A<int>& a) { a = data; }
A<int> data;
};
}
and set auto_veto = true in the ".wit" toml.
Interestingly, read write access for B::data is generated, but faulty, whereas B::f is skipped. I tried to track this one down myself, but I cannot exactly pin down what leads to this failure.
Using auto_veto = false and this file here
namespace N {
template<typename T>
class A {
public:
A(): a(0){}
T getval(){ return a;}
void setval(const T& val){ a = val; }
T a;
};
template class A<int>;
void g(A<int>& a) { }
class B {
public:
void f(A<int>& a) { a = data; }
A<int> data;
};
}
generates B::F, but the access to data is still broken.
Metadata
Metadata
Assignees
Labels
No labels