• Jason Rhinelander's avatar
    Detect std::pair non-copyability · 79372601
    Jason Rhinelander authored
    Pre-C++17, std::pair can technically have an copy constructor even
    though it can't actually be invoked without a compilation failure (due
    to the underlying types being non-copyable).  Most stls, including
    libc++ since ~3.4, use the C++17 behaviour of not exposing an uncallable
    copy constructor, but FreeBSD deliberately broke their libc++ to
    preserve the nonsensical behaviour
    (https://svnweb.freebsd.org/base?view=revision&revision=261801).
    
    This updates pybind's internal `is_copy_constructible` to also detect
    the std::pair case under pre-C++17.
    
    This also everything (except for a couple cases in the internal version)
    to use the internal `is_copy_constructible` rather than
    `std::is_copy_constructible`.
    79372601
stl_bind.h 20.3 KB