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

C++20 modules #1650

Closed
danielvandenberg95 opened this issue Jul 31, 2019 · 1 comment

Comments

@danielvandenberg95
Copy link

commented Jul 31, 2019

Prerequisites

  • [x ] I have written a descriptive issue title
  • [x ] I have verified that I am using the latest version of ImageMagick
  • [x ] I have searched open and closed issues to ensure it has not already been reported

Description

Magick++ can not be used in C++20 with modules enabled.
typedef struct _MagickInfo { char *name, *description, *version, *mime_type, *note, *module;//Seen as a keyword

Steps to Reproduce

  1. Make into Visual Studio project
  2. Create an extra visual studio project, with Magick++ as dependency.
  3. Add #include <magick++.h>
  4. Enable /experimental:module
  5. Try compiling.
  6. Get magick.h(69): error C2059: syntax error: 'module'.

System Configuration

  • ImageMagick version: master
  • Environment (Operating system, version and so on): Windows, Visual Studio 2017, 64 bits.
  • Additional information: I did not test this in other compilers supporting modules, but to my knowledge of the proposal using the keyword "module" as a variable name will be illegal.
@urban-warrior

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

urban-warrior pushed a commit that referenced this issue Jul 31, 2019
Cristy
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Jul 31, 2019
@dlemstra dlemstra modified the milestones: 7.0.8-59, 7.0.8-60 Aug 10, 2019
@dlemstra dlemstra closed this Aug 12, 2019
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 25, 2019
2019-08-10  7.0.8-60 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-60, GIT revision 16020:52ff205:20190810.

2019-08-07  7.0.8-60 Cristy  <quetzlzacatenango@image...>
  * Enable reading EXR image file from stdin.

2019-08-04  7.0.8-59 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-59, GIT revision 15986:c3de0e7:20190804.

2019-08-01  7.0.8-59 Cristy  <quetzlzacatenango@image...>
  * Module is a reserved keyword for C++ 20 (reference
    ImageMagick/ImageMagick#1650).

2019-07-29  7.0.8-58 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-58, GIT revision 15962:cf00632:20190729.

2019-07-27  7.0.8-58 Cristy  <quetzlzacatenango@image...>
  * Improve GetNextToken() performance.

2019-07-26  7.0.8-57 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-57, GIT revision 15948:8fba4a3:20190726.

2019-07-22  7.0.8-57 Cristy  <quetzlzacatenango@image...>
  * Heap-buffer-overflow in Postscript coder (reference
    ImageMagick/ImageMagick#1644).
  * The -alpha shape option nondeteministic under OpenMP (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=36396).
  * Correction to the ModulusAdd and ModulusSubtract composite op (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=2&t=36413).

2019-07-20  7.0.8-56 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-56, GIT revision 15936:2ac4147:20190720.

2019-07-20  7.0.8-56 Cristy  <quetzlzacatenango@image...>
  * Unexpected -alpha shape results (reference
    https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=36396).
  * Converting from PDF to PBM inverts the image (reference
    ImageMagick/ImageMagick#1643).
mockdeep added a commit to rmagick/rmagick that referenced this issue Sep 13, 2019
This is for a recent change that was made to ImageMagick 6 and 7. The library had issues to be compiled with C++20 with modules enabled (ImageMagick/ImageMagick#1650). To fix this issue a define was intruduced to resolve that problem by renaming the field in the struct but the code that uses this field should use magick_module to get the value of that field. This PR adds the define for older version of ImageMagick and uses that define to get the value of the field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.