Explicit instantiation bug of `CImgList`
NeumoNeumo opened this issue · 1 comments
NeumoNeumo commented
When I try to instantiate CImgList
in the latest commit like this
#include "CImg.h"
template struct cimg_library::CImgList<unsigned char>;
What I get from the compiler is
In file included from b.cpp:1:
./CImg.h:65161:29: error: cannot cast from type 'CImg<unsigned char>' to pointer type 'char *'
CImg<charT>::string((char*)_data[l]).move_to(str);
^~~~~~~~~~~~~~~
b.cpp:3:31: note: in instantiation of member function 'cimg_library::CImgList<unsigned char>::
__display' requested here
template struct cimg_library::CImgList<unsigned char>;
^
1 error generated.
Perhaps what you want in CImg.h
is
CImg<charT>::string((char*)(_data[l]._data)).move_to(str);
dtschump commented
That's it, yes, thanks for reporting!