crange, and range const overloads
authorYedidya Feldblum <yfeldblum@fb.com>
Tue, 7 Nov 2017 01:29:12 +0000 (17:29 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 7 Nov 2017 01:37:57 +0000 (17:37 -0800)
commit0718262d68d759b2db1007f70fe8d5faf3aed915
tree4a731415a5aef05936268495a487ef0406a24ca5
parentc593d8eda8eea90818908fce46409b970ca1f540
crange, and range const overloads

Summary:
[Folly] `crange`, and `range` `const` overloads.

Instead of using universal reference for `range` overloads, bifurcate explicitly between `&` and `const&` overloads. The `&` overloads return `Range<T*>` while the `const&` overloads return `Range<T const*>`.

Add `crange` overloads, which may accept non-`const` arguments but will return `Range<T const*>` results anyway.

Reviewed By: ot

Differential Revision: D6242038

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