Opened 8 years ago
Closed 8 years ago
#6 closed defect (fixed)
Vector as Field of Generic Type Fails to Compile
| Reported by: | ajbeach | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
I tried to make a generic container (a stack) that used a vector as a base. However it would not compile, even when I stripped it down to the most simple member function.
forall(otype T)
struct stack {
vector(T, heap_allocator(T)) data;
};
bool empty(stack(int) * this) {
return empty(&this->data);
}
Error message I received:
CFA Version 1.0.0 (debug)
implicit-handlers.c:45 error: No reasonable alternatives for expression Applying untyped:
Name: empty
...to:
Address of:
Untyped Member Expression, with field:
Name: data
from aggregate:
Applying untyped:
Name: *?
...to:
Name: this
Change History (2)
comment:1 by , 8 years ago
| Priority: | major → minor |
|---|
comment:2 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed as of commit c7a30813626cbca3ee08af1e72db028b89e73881