teslamotors / fixed-containers

C++ Fixed Containers
MIT License
352 stars 31 forks source link

[RandomAccessIterator] Fix reference to non-existent member #129

Closed alexkaratarakis closed 2 weeks ago

alexkaratarakis commented 2 weeks ago

Exposed by https://github.com/teslamotors/fixed-containers/issues/128

This was previously building without issue due to two-phase lookup and the function never being called. New units tests will instantiate this function.

template <class T>
struct MockTemplate
{
    int foo(const MockTemplate<T>& input) const { return input.variable_that_does_not_exist; }
};

int main()
{
    MockTemplate<int> it{};
    (void)it;
    // it.foo(it);
}