If you are looking at a device that is truly smart and loves to be a smartphone, then just get the Pixel2XL. With the display issue sorted compared to the initial batches and with the OS on Android Pie, it has the best standby time compared to any other device. The screen on time has also been way beyond my expectations. I have been getting close to 6 hours on an average.
Coming to the camera, it's got the 2nd best camera in the world (Only bettered by the Pixel3XL). You can compare it's pictures with the S9+ and iPhoneXS and you'll be spellbound with the quality of pictures and videos. The only drawback in camera is it records in Mono.
Regarding battery life, never have I trusted a device with its battery life as much I trust the Pixel2XL. The AI algorithms in the OS understand your usage pattern within the first couple of days and from there on, you'll be amazed at how much one can squeeze of Pixel2XL's battery.
OS wise, Android is developed by Google and Google built this phone to ensure it runs as smooth, if not smoother than the iPhone. Trust me, it does even after running a generation old processor. With access to major software updates for another 2 years and security patches for another three years, your investment on this device will be worth those 3 years.
If you are considering between the Oneplus 6T 128GB or iPhone 7 64GB version and are also thinking of an alternative to any device in the 40K price range, eyes closed, get the Pixel2XL. You'll be happy for another 3 years for sure.