Menu

#12 libpgf: Only #define nullptr when using C++ < 11

Unstable (example)
closed-fixed
None
5
2019-02-26
2019-02-24
No

nullptr has been part of the C++ standard since C++11, so redefining it is a bad idea. It causes actual build issues on e.g. FreeBSD, whose sys/_null.h has

#if __cplusplus >= 201103L                                                                                                                               
#define NULL    nullptr

so actually using libpgf with code built with -std=c++11 or later that still uses NULL causes a loop because nullptr is defined to NULL, which is defined to nullptr.

1 Attachments

Discussion

  • Christoph Stamm

    Christoph Stamm - 2019-02-26
    • status: open --> closed-fixed
     
  • Christoph Stamm

    Christoph Stamm - 2019-02-26

    Thanks for your ticket and hint!

     

Log in to post a comment.