Technically speaking, there is nothing like “linear RGB”, since RGB is not an unique representation… what CImg::srgb2rgb() does is to convert “standard” sRGB to “linear” sRGB.
Indeed, in the conversion from sRGB to XYZ (which is the first step for converting to Lab), one needs to use linearized sRGB values.
In the case of the conversion to HSV, the gamma encoding of the input RGB values is, as far as I know, not specified. HSV is actually a color representation and not a colorspace, and as such the H, S and V values depend on the colorspace and gamma encoding of the input RGB triplets. The same is true for the HSL and HSI representations.
However, I’m pretty sure that a conversion from sRGB to HSL, HSV or HSI yields different H and S values depending if the input sRGB values are linear or gamma-encoded. In fact, those representations belong to a pre-colormanagement era, and in my opinion the only meaningful and unique polar representation to be used in modern color processing is LCh (i.e. Lab in polar coordinates).
The specifications are more clear in the case of YCbCr (and Y’CbCr): Y’CbCr must be derived from gamma-encoded RGB values, while YCbCr from linear RGB (as far as I understood).
Y’UV definitely requires gamma-encoded values (Wikipedia only discusses Y’UV, and I could not find any explicit mention of YUV).
For RGB <-> CMY(K) I have honestly no idea yet.
My 2cts 