I'm currently on a 40t chainring and 11-42 cassette as well. It was previously a 40t with 11-36 but I didn't have enough gears to climb the local MTB trails.
So far, I've been going up and around 12%+ gradients on dry/hard pack without an issue. Taking it on the road, the 40x11 is enough to keep me moving at 25MPH at a 90RPM cadence.