views:

39

answers:

3

I am pretty sure this has something to do with a vector of void function pointers, but I can't really make anything out of it.

Can someone break this down for me?

__gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > >::difference_type __gnu_cxx::operator-<unsigned long long const*, unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> ...> >(__gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > > const&, __gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > > const&)
+1  A: 

If I am correct, this could be roughly translated to:

// Typedef for brevity
typedef vector<unsigned long long>::iterator uv_iter;
// Actual function
uv_iter::difference_type operator-(const uv_iter &, const uv_iter &);

So, probably it is referring to the function that computes the difference (=distance) between two iterators of a vector. Anyhow, when the optimizer is on such function should actually be turned in a simple inlined pointers comparison.

Matteo Italia
+1  A: 

It appears to be related to subtracting two std::vector<unsigned long long>::iterators.

Jerry Coffin
+1  A: 

This is the subtraction operator (operator-) for taking the difference of two iterators into vectors of unsigned long longs. In normal C++, without all of the allocators and extra template parameters, this function signature would look like this:

std::vector<unsigned long long>::iterator::difference_type operator- 
  (const std::vector<unsigned long long>::iterator& first,
   const std::vector<unsigned long long>::iterator& second);

Where std::vector<unsigned long long>::iterator::difference_type is normally the same as ptrdiff_t.

Tyler McHenry