Require compile-time constant format strings to `shellify`
authorPhil Willoughby <philwill@fb.com>
Tue, 31 Jan 2017 09:37:27 +0000 (01:37 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 31 Jan 2017 09:47:50 +0000 (01:47 -0800)
commit84d872be72aa1909dfad98b0f7644d2c157c47a9
tree2ef64af6e4a6f2c62022293e99454cfef278ffdb
parent0cd1f8475c9cff8aaf102204d72ded2fdd9e9fb4
Require compile-time constant format strings to `shellify`

Summary:
Because it's impossible to require that a parameter to a function is a compile-time constant string this replaces `shellify()` with the user-defined-literal suffix `_shellify()`.

It's trivial to convert previously-correct code: `shellify("whatever {}", A)` => `"whatever {}"_shellify(A)`

The previous `folly::shellify()` API is still present as a transition measure. Compilers will issue a deprecation warning if it is used.

Reviewed By: yfeldblum

Differential Revision: D4435512

fbshipit-source-id: 6639cd91280dc72108e47a8a7775c5160a4e644f
folly/Shell.h
folly/test/ShellTest.cpp