Simple Boolean "Latch" with state
There is not much to improve in my opinion, except:
Unnecessary use of std::move()
You are passing shouldLatch, onLatch and onUnlatch by value to the constructor, so there is no reason to use std::move() in the member initializer list.