• Matthew Woehlke's avatar
    Avoid C-style const casts (#659) · e15fa9f9
    Matthew Woehlke authored
    * Avoid C-style const casts
    
    Replace C-style casts that discard `const` with `const_cast` (and, where
    necessary, `reinterpret_cast` as well).
    
    * Warn about C-style const-discarding casts
    
    Change pybind11_enable_warnings to also enable `-Wcast-qual` (warn if a
    C-style cast discards `const`) by default. The previous commit should
    have gotten rid of all of these (at least, all the ones that tripped in
    my build, which included the tests), and this should discourage more
    from newly appearing.
    e15fa9f9
numpy.h 43 KB