You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to include ThreadPool.h in in different source files in my project, the linker starts complaining about duplicate symbols. I'm using XCode 4.6.1 (clang 4.2).
I assume all the nontemplate members need to be put in a cpp file for that to work. Alternatively we could think of an excuse to make ThreadPool a template itself :D (like having a scheduling policy parameter).
Activity
progschj commentedon Apr 4, 2013
I assume all the nontemplate members need to be put in a cpp file for that to work. Alternatively we could think of an excuse to make ThreadPool a template itself :D (like having a scheduling policy parameter).
iliocatallo commentedon Apr 4, 2013
So, if I got it right, it is sufficient to move all non-tempalate members in a hypothetical ThreadPool.cpp file. I'll try ASAP ;)
progschj commentedon Apr 5, 2013
I fixed this on the develop branch by declaring the nontemplates inline.