Just for some context, the 6P has the O dev preview, that doesn't guarantee it, but the final release is probably September, which is when "guaranteed updates" ends for the 6P. Both the 5X and 6P are on O in the dev preview and I believe both of them will get the final version.
Examples (just the phones)
Nexus One - Launched with Eclair, Got Froyo, Ended on Gingerbread - 2 major updates
Nexus S - Launched with GB, got Ice Cream Sandwich, Ended on Jelly bean - 2 major updates
G Nex - Launched with ICS, got both JB updates, Ended on 2nd JB - 2 major updates
Nexus 4 - Launched with JB, got KK, Ended on Lollipop - 2 major updates
Nexus 5 - Launched with KK, got LP, ended on Marshmallow - 2 major updates
Nexus 6 - Launched with LP, got MM, Ended on Nougat - 2 major updates
Nexus 6P - Launched with MM, Got N .... Will almost certainly end on O
Nexus 5X - Launched with MM, Got N .... Will almost certainly end on O
Pixel - Launched with Nougat, will get O, Will probably end with P
Examples (just the phones)
Nexus One - Launched with Eclair, Got Froyo, Ended on Gingerbread - 2 major updates
Nexus S - Launched with GB, got Ice Cream Sandwich, Ended on Jelly bean - 2 major updates
G Nex - Launched with ICS, got both JB updates, Ended on 2nd JB - 2 major updates
Nexus 4 - Launched with JB, got KK, Ended on Lollipop - 2 major updates
Nexus 5 - Launched with KK, got LP, ended on Marshmallow - 2 major updates
Nexus 6 - Launched with LP, got MM, Ended on Nougat - 2 major updates
Nexus 6P - Launched with MM, Got N .... Will almost certainly end on O
Nexus 5X - Launched with MM, Got N .... Will almost certainly end on O
Pixel - Launched with Nougat, will get O, Will probably end with P