fix inline

add container/indexes.hpp
add tuple/indexes.hpp
This commit is contained in:
bolero-MURAKAMI 2012-04-04 22:23:41 +09:00
parent ba6482d1ec
commit c6bd230ee4
340 changed files with 1087 additions and 979 deletions

View file

@ -10,7 +10,7 @@ namespace sprout {
// 25.4.3.4 binary_search
template<typename ForwardIterator, typename T>
SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value) {
inline SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value) {
return first == last ? false
: sprout::next(first) == last ? !(*first < value) && !(value < *first) ? true : false
: *sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2) < value
@ -22,7 +22,7 @@ namespace sprout {
}
template<typename ForwardIterator, typename T, typename Compare>
SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
inline SPROUT_CONSTEXPR bool binary_search(ForwardIterator first, ForwardIterator last, T const& value, Compare comp) {
return first == last ? false
: sprout::next(first) == last ? !comp(*first, value) && !comp(value, *first) ? true : false
: comp(*sprout::next(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last) / 2), value)