Skip to content
Snippets Groups Projects
  • Alexandre Janniaux's avatar
    configure: check typeof on C++ compilers · 784c3245
    Alexandre Janniaux authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    C compilers can have GNU extensions to support typeof in C code, but
    some C++ compilers like clang are removing the builtin since decltype
    can be used in C++ without the constraints from typeof. Decltype is not
    100% equivalent for this reason: references will be kept in the returned
    type.
    
    The check in m4/typeof.m4 comes from graydon/monotone and dovecot/core
    and was slightly modified to namespace the define for C++ code.
    784c3245