Operator Overloading - Inline atribute

Hi there!

Im just getting started with operators overloading with classes.

I have seen some code where they use the sentence "inline" in the function and some others that don't.

What's is the main difference between this sintaxis?

Thanks!
Maybe it is long, but I think it is an awesome explanation:
https://isocpp.org/wiki/faq/inline-functions
> I have seen some code where they use the sentence "inline" in the function and some others that don't.
> What's is the main difference between this sintaxis?

If the friend function is defined entirely within the class, it is implicitly inline.

Otherwise, if the friend function is defined in a header file, it is typically declared as inline;
(there would be an identical definition of the function in each translation unit that includes the header).
Topic archived. No new replies allowed.