fix SPROUT_CXX14_CONSTEXPR specifier

This commit is contained in:
bolero-MURAKAMI 2015-03-11 20:40:19 +09:00
parent 905419eb17
commit ee008e8a77

View file

@ -51,12 +51,12 @@ namespace sprout {
// 0 // 0
// //
template<typename ForwardIterator, typename Predicate> template<typename ForwardIterator, typename Predicate>
inline SPROUT_CONSTEXPR ForwardIterator inline SPROUT_CXX14_CONSTEXPR ForwardIterator
partition_point(ForwardIterator first, ForwardIterator last, Predicate pred) { partition_point(ForwardIterator first, ForwardIterator last, Predicate pred) {
typedef typename std::iterator_traits<ForwardIterator>::difference_type difference_type; typedef typename std::iterator_traits<ForwardIterator>::difference_type difference_type;
for (difference_type len = sprout::distance(first, last); len != 0; ) { for (difference_type len = sprout::distance(first, last); len != 0; ) {
const difference_type half = len / 2; difference_type const half = len / 2;
const ForwardIterator mid = sprout::next(first, half); ForwardIterator const mid = sprout::next(first, half);
if (pred(*mid)) { if (pred(*mid)) {
first = sprout::next(mid); first = sprout::next(mid);
len -= half + 1; len -= half + 1;