Inline & not-inline
Posted
by
anon
on Stack Overflow
See other posts from Stack Overflow
or by anon
Published on 2010-12-24T18:40:23Z
Indexed on
2010/12/24
18:54 UTC
Read the original article
Hit count: 437
c++
Suppose I have:
struct Vec3 {
double x;
double y;
double z;
} ;
inline double dot(const Vec3& lhs, const Vec3& rhs) {
return lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z ;
}
Is it possible to have "dot" also exist in a non-inlined version, so that it can be in the *.so , so that when I dl open it I can call it?
I.e. I want files that include the above header to use the inlined version, but I also want the function to exist in a *.so, so I can dl open it and call it dynamically.
© Stack Overflow or respective owner