make folly::Range literal type
authorPhilip Pronin <philipp@fb.com>
Thu, 17 Jul 2014 20:05:02 +0000 (13:05 -0700)
committerTudor Bosman <tudorb@fb.com>
Mon, 21 Jul 2014 19:22:03 +0000 (12:22 -0700)
commit7756a098ce442cca96e32dd6fe14372284b3402f
tree9dc4566349c6501ee37e3be63789ec76f3ac9ea2
parentcb2dc2c8e4fefcc3dd38ed90e2aca02bc1e82e2c
make folly::Range literal type

Summary:
7.1.5 [dcl.constexpr] / 9 (N3337) requires type to be literal to use it
in `constexpr` object declaration (seems to be not enforced by GCC 4.8?)

Currently `folly::Range<>` fails one of the requirements:

* is an aggregate type, or has at least one constexpr constructor or
constructor template that is not a copy or move constructor,

Test Plan: fbconfig folly/test:range_test && fbmake runtests_opt -j32

Reviewed By: lucian@fb.com

Subscribers: chaoyc, search-fbcode-diffs@, unicorn-diffs@

FB internal diff: D1441646

Tasks: 4720575
folly/Range.h
folly/test/RangeTest.cpp