-2

Possible Duplicate:
Why are C++ inline functions in the header

Is it any difference between write inline method realization in header or cpp-file?

Community
  • 1
  • 1
ManInTheHood
  • 423
  • 1
  • 4
  • 12

2 Answers2

1

inline makes sense in the header, along with the function definition. If it's in an implementation file, multiple definition isn't an issue, and the compiler will have a hard time inlining it anyway outside that translation unit (and inside that translation unit, it probably won't matter anyway - it's just a hint).

Luchian Grigore
  • 253,575
  • 64
  • 457
  • 625
0

I guess, functionally, the answer is no. Semantically, inline doesn't make any sense in the cpp file.

PinkElephantsOnParade
  • 6,452
  • 12
  • 53
  • 91