I’ve come across this single file algorithm for converting float to ASCII string, and what doesn’t make sense to me is the comment at the top:
namespace { // anonymous namespace to encourage inlining
}
I’ve been reading that anonymous namespaces in a header file will make any functions in that namespace static, but what does it do to class definitions such as in this case? Why would wrapping something like this in an anonymous namespace “encourage” people to inline it?
1