CommandLine cl::opt - how to parse -ftemplate-depth-n style options?

How do I use cl::opt to parse options like -ftemplate-depth-n, where n is any integer? cl::opt<int> only matches options of the form -ftemplate-depth=128 or -ftemplate-depth 128.

I don’t think I can use a custom parser as shown in the docs, because that starts parsing on the value, and since there’s no delimiter here, it would need a flag to change the option name parser.