Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Failed to specialize function template

Avatar of Sandra-24
Sandra-24 asked on
C++
21 Comments1 Solution1057 ViewsLast Modified:
This is a really odd error, it's happening in this context:

template<class _Iter>
_Vector(_Iter first, _Iter last)
{
  std::distance(first,last);
}

I've removed some code from the above, but the error still happens with just that left.

As best I can tell from the source, std::distance isn't specialized, although it uses some types from iterator_traits which is.

But the oddest part is I don't even invoke that constructor anywhere, so how does it know it can't specialize based on _Iter? it doesn't know what type it is yet!

Where do I start with solving this problem?

thanks,
-Sandra

ASKER CERTIFIED SOLUTION
Avatar of jkr
Commented:
This problem has been solved!
Unlock 1 Answer and 21 Comments.
See Answers