0

Apparently, the search engine doesn't seem to be taking this symbol ' <> ' into search, Hence can anyone please explain to me what does this symbol mean as well as the statement?

For the statement, I can guess that

p = I.ptr<uchar>(i);

p happens to be pointing at I[i] address.

Thanks :)

Tejas Thakar
  • 585
  • 5
  • 19
MaNyYaCk
  • 167
  • 2
  • 14

1 Answers1

0

It's calling a member function of the class with an argument of i. For example

#include <iostream>

using std::cout;
using std::endl;

class Something {
public:
    template <typename T>
    T do_something(T in) {
        cout << __PRETTY_FUNCTION__ << endl;
        return in;
    }
};

int main() {
    auto something = Something{};
    // <int> not really needed here, the type can be deduced,
    // just here for demonstration purposes
    auto integer = something.do_something<int>(1);
    (void) integer;
}

Note that in order to do this in the context of a template type you would need to prefix the method call with template as explained in this question - Where and why do I have to put the "template" and "typename" keywords?

Curious
  • 20,870
  • 8
  • 61
  • 146