The body of an inline function needs to be in the header so that the compiler can actually substitute it wherever required. See this: How do you tell the compiler to make a member function inline?
More Related Contents:
- When should I write the keyword ‘inline’ for a function/method?
- Inline functions vs Preprocessor macros
- When to use inline function and when not to use it?
- Are inline virtual functions really a non-sense?
- Does it make any sense to use inline keyword with templates?
- Why are C++ inline functions in the header?
- What’s the scope of inline friend functions?
- Does constexpr imply inline?
- Inline function linkage
- C++ inline member function in .cpp file
- c++ inline function?
- Function declaration inside or outside the class
- what is/are the purpose(s) of inline?
- Is there still a use for inline? [duplicate]
- How will i know whether inline function is actually replaced at the place where it is called or not?
- When do compilers inline C++ code?
- Is “inline” implicit in C++ member functions defined in class definition
- When to use the inline function and when not to use it?
- friend AND inline method, what’s the point ?
- Should one never use static inline function?
- Does GCC inline C++ functions without the ‘inline’ keyword?
- Template definitions outside class body
- Win32 programming hiding console window
- GNU GCC (g++): Why does it generate multiple dtors?
- How can i use member initialization list to initialize an array?
- exit() call inside a function which should return a reference
- What is the use of 0-length array (or std::array)?
- How to install feature based on the property set in custom action?
- What’s the differences between .dll , .lib, .h files?
- comma operator in if condition