Duplicate symbols error for compute_effective_sample_size.hpp

The function definitions in the header …/stan/analyze/mcmc/compute_effective_sample_size.hpp give a “duplicate symbols” linker error if included in more than a single translation unit; adding inline to their signature (= allow multiple definitions) removes the error. Is there a reason why the implementations should not be separated from the declarations? Is there a general intent to keep Stan header-only as much as possible?
Thanks,
– Tal

It’s my understanding that the developers do want to maintain a header-only library.

I’m going to bump this and cc @Bob_Carpenter, so he knows that I don’t have a complete answer.

Thanks!
For completeness’ sake: IMHO there should be little downside to adding “inline”, since I guess the vast majority of Stan users wouldn’t be sensitive to slightly larger binary artifacts. Bob asked me to move such discussion over here, instead of polluting https://github.com/stan-dev/stan/issues/2569 :)

Yes, we should add inline. I added an issue.

We’re going to be separating things into more headers and separate compilation units going forward as the C++ compilers continue to get slower.