Add a UDL suffix to define a StringPiece
authorPhil Willoughby <philwill@fb.com>
Tue, 8 Aug 2017 10:19:16 +0000 (03:19 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 8 Aug 2017 10:22:16 +0000 (03:22 -0700)
commitd44f36ab667239d020b0746d8da279b41997d869
tree16b0dd4c5aeed6befe64ae2348275929c18ce61b
parent148df69fbab537463ea2a39276b60155b5c0d6bc
Add a UDL suffix to define a StringPiece

Summary:
Use it like this:
```
using namespace folly::string_piece_literals;
StringPiece p = "A literal string"_sp;
```

In some compilation environments it can be more efficient than the implicit
conversion from `char const *` to `StringPiece`.

Reviewed By: yfeldblum

Differential Revision: D5562782

fbshipit-source-id: ce715edc65b1510761e127bf89a6936370253a68
folly/Range.h
folly/test/RangeTest.cpp