mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add new directory sprout/algorithm/cxx14/
This commit is contained in:
parent
39d60a514f
commit
040278bd11
76 changed files with 1165 additions and 761 deletions
|
@ -9,13 +9,14 @@
|
|||
#define SPROUT_UUID_IO_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <ios>
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <locale>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/algorithm/find.hpp>
|
||||
#include <sprout/algorithm/cxx14/copy.hpp>
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/uuid/uuid.hpp>
|
||||
#include <sprout/uuid/detail/table.hpp>
|
||||
|
@ -45,7 +46,7 @@ namespace sprout {
|
|||
for (sprout::uuids::uuid::size_type i = 0, last = rhs.size(); i < last && lhs; ++i) {
|
||||
lhs >> c;
|
||||
c = ctype.toupper(c);
|
||||
char_type const* f = std::find(xdigits, xdigits_end, c);
|
||||
char_type const* f = sprout::find(xdigits, xdigits_end, c);
|
||||
if (f == xdigits_end) {
|
||||
lhs.setstate(std::ios_base::failbit);
|
||||
break;
|
||||
|
@ -53,7 +54,7 @@ namespace sprout {
|
|||
sprout::uuids::uuid::value_type byte = static_cast<sprout::uuids::uuid::value_type>(std::distance(&xdigits[0], f));
|
||||
lhs >> c;
|
||||
c = ctype.toupper(c);
|
||||
f = std::find(xdigits, xdigits_end, c);
|
||||
f = sprout::find(xdigits, xdigits_end, c);
|
||||
if (f == xdigits_end) {
|
||||
lhs.setstate(std::ios_base::failbit);
|
||||
break;
|
||||
|
@ -72,7 +73,7 @@ namespace sprout {
|
|||
}
|
||||
}
|
||||
if (lhs) {
|
||||
std::copy(data, data + 16, rhs.begin());
|
||||
sprout::copy(data, data + 16, rhs.begin());
|
||||
}
|
||||
}
|
||||
return lhs;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#define SPROUT_UUID_UUID_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
#include <type_traits>
|
||||
|
@ -18,6 +17,8 @@
|
|||
#include <sprout/iterator/reverse_iterator.hpp>
|
||||
#include <sprout/algorithm/equal.hpp>
|
||||
#include <sprout/algorithm/lexicographical_compare.hpp>
|
||||
#include <sprout/algorithm/cxx14/fill_n.hpp>
|
||||
#include <sprout/algorithm/cxx14/swap_ranges.hpp>
|
||||
#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION
|
||||
# include <sprout/iterator/index_iterator.hpp>
|
||||
#endif
|
||||
|
@ -82,10 +83,10 @@ namespace sprout {
|
|||
value_type elems[static_size];
|
||||
public:
|
||||
SPROUT_CXX14_CONSTEXPR void fill(const_reference value) {
|
||||
std::fill_n(begin(), size(), value);
|
||||
sprout::fill_n(begin(), size(), value);
|
||||
}
|
||||
SPROUT_CXX14_CONSTEXPR void swap(uuid& other) SPROUT_NOEXCEPT {
|
||||
std::swap_ranges(other.begin(), other.end(), begin());
|
||||
sprout::swap_ranges(other.begin(), other.end(), begin());
|
||||
}
|
||||
// iterators:
|
||||
#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue