Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation errors with _fill(expression) method #392

Closed
evan-barentin opened this issue Aug 4, 2023 · 3 comments
Closed

Compilation errors with _fill(expression) method #392

evan-barentin opened this issue Aug 4, 2023 · 3 comments

Comments

@evan-barentin
Copy link

Hi!

In our code, we are using quite heavily explicit instantiation in order to gain some compilation time, but when switching from CImg 2.9 to a more recent version, we get the following compilation errors with both g++ & clang++:

./CImg.h:32705:14: note: '_fill' declared here
    CImg<T>& _fill(const char *const expression, const bool repeat_values, const unsigned int mode,
             ^
./CImg.h:29472:72: error: too many arguments to function call, expected 7, have 8
      return maxabs((+*this)._fill(expression,true,3,0,0,"maxabs",this,0));
                    ~~~~~~~~~~~~~~                                     ^
main.cc:3:31: note: in instantiation of member function 'cimg_library::CImg<>::maxabs' requested here
template struct cimg_library::CImg<float>;

Here is a small toy code which reproduces this behaviour:

#include "CImg.h"

template struct cimg_library::CImg<float>;

int main() { return 0; }

Thanks for all your work on this helpful library and have a nice day :)

@dtschump
Copy link
Collaborator

dtschump commented Aug 5, 2023

Thanks for reporting. I confirm the issue.
Will work on a fix ASAP.

@dtschump
Copy link
Collaborator

dtschump commented Aug 5, 2023

It seems to work now, with my latest commits.
I've just released on the website a new prerelease 3.2.7_pre, with the fix included.
Could you tell me if that works for you ? Thanks!

@evan-barentin
Copy link
Author

Hello

Thanks a lot for the quick response & fix! The latest pre-release works perfectly fine with both g++ & clang++ on my computer.

Sorry for the delay in the reply, I was away from computers from the last weeks…

Have a nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants