)]}'
{
  "commit": "8a7c266d26e5c9de3beb478bedddcee26f026b04",
  "tree": "23030e17de8e0777b94541418dc79d2e698e1898",
  "parents": [
    "750e38dcfdac59231a615580d4e6cb3647b31779"
  ],
  "author": {
    "name": "Bruce Merry",
    "email": "1963944+bmerry@users.noreply.github.com",
    "time": "Mon Oct 11 17:35:39 2021 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Oct 11 08:35:39 2021 -0700"
  },
  "message": "Fix make_key_iterator/make_value_iterator for prvalue iterators (#3348)\n\n* Add a test showing a flaw in make_key_iterator/make_value_iterator\r\n\r\nIf the iterator dereference operator returns a value rather than a\r\nreference (and that pair also does not *contain* references),\r\nmake_key_iterator and make_value_iterator will return a reference to a\r\ntemporary, causing a segfault.\r\n\r\n* Fix make_key_iterator/make_value_iterator for prvalue iterators\r\n\r\nIf an iterator returns a pair\u003cT1, T2\u003e rather than a reference to a pair\r\nor a pair of references, make_key_iterator and make_value_iterator would\r\nreturn a reference to a temporary, typically leading to a segfault. This\r\nis because the value category of member access to a prvalue is an\r\nxvalue, not a prvalue, so decltype produces an rvalue reference type.\r\nFix the type calculation to handle this case.\r\n\r\nI also removed some decltype parentheses that weren\u0027t needed, either\r\nbecause the expression isn\u0027t one of the special cases for decltype or\r\nbecause decltype was only used for SFINAE. Hopefully that makes the code\r\na bit more readable.\r\n\r\nCloses #3347\r\n\r\n* Attempt a workaround for nvcc",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "370e52cff69b15500a9a3b384cb1973f0ce5e325",
      "old_mode": 33188,
      "old_path": "include/pybind11/pybind11.h",
      "new_id": "285f3b18cb7e8c760aba9b4559bbcc9850c2a32d",
      "new_mode": 33188,
      "new_path": "include/pybind11/pybind11.h"
    },
    {
      "type": "modify",
      "old_id": "9de69338bc8efd094003eb34b36ea094640b8320",
      "old_mode": 33188,
      "old_path": "tests/test_sequences_and_iterators.cpp",
      "new_id": "a378128ae2ca6aad87f8fa502bb54b62a8f1272d",
      "new_mode": 33188,
      "new_path": "tests/test_sequences_and_iterators.cpp"
    },
    {
      "type": "modify",
      "old_id": "38e2ab5b757401bacc57a4a1e3aa27a315b898c4",
      "old_mode": 33188,
      "old_path": "tests/test_sequences_and_iterators.py",
      "new_id": "6985918a11db72c9cb550a7b6613b58445eee50b",
      "new_mode": 33188,
      "new_path": "tests/test_sequences_and_iterators.py"
    }
  ]
}
