Avoid the use of boost::variant::which, which tends to produce code which is not verifiable at compile-time.