mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
add macro SPROUT_NON_CONSTEXPR
This commit is contained in:
parent
6b1ef202d8
commit
1132d08f23
37 changed files with 209 additions and 204 deletions
|
@ -335,7 +335,7 @@ namespace sprout {
|
|||
}
|
||||
SPROUT_CXX14_CONSTEXPR void
|
||||
do_right_shift(std::size_t shift) SPROUT_NOEXCEPT {
|
||||
if (shift != 0) {
|
||||
if (shift != 0) {
|
||||
std::size_t const wshift = shift / (CHAR_BIT * sprout::detail::sizeof_<unsigned long>::value);
|
||||
std::size_t const offset = shift % (CHAR_BIT * sprout::detail::sizeof_<unsigned long>::value);
|
||||
std::size_t const limit = N - wshift - 1;
|
||||
|
@ -882,10 +882,10 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR bitset<N>
|
||||
operator^(sprout::bitset<N> const& lhs, sprout::bitset<N> const& rhs) SPROUT_NOEXCEPT;
|
||||
template<typename Char, typename Traits, std::size_t N>
|
||||
inline std::basic_istream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_istream<Char, Traits>&
|
||||
operator>>(std::basic_istream<Char, Traits>& lhs, sprout::bitset<N>& rhs);
|
||||
template<typename Char, typename Traits, std::size_t N>
|
||||
inline std::basic_ostream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& lhs, sprout::bitset<N> const& rhs);
|
||||
|
||||
template<std::size_t N>
|
||||
|
@ -1037,7 +1037,7 @@ namespace sprout {
|
|||
}
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
void
|
||||
SPROUT_NON_CONSTEXPR void
|
||||
copy_from_string(
|
||||
std::basic_string<Char, Traits, Alloc> const& s,
|
||||
std::size_t pos, std::size_t n, Char zero, Char one
|
||||
|
@ -1046,7 +1046,7 @@ namespace sprout {
|
|||
copy_from_ptr<Char, Traits>(s.data(), s.size(), pos, n, zero, one);
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
void
|
||||
SPROUT_NON_CONSTEXPR void
|
||||
copy_to_string(std::basic_string<Char, Traits, Alloc>& s, Char zero, Char one) const {
|
||||
s.assign(N, zero);
|
||||
for (std::size_t i = N; i > 0; --i) {
|
||||
|
@ -1056,12 +1056,12 @@ namespace sprout {
|
|||
}
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
void
|
||||
SPROUT_NON_CONSTEXPR void
|
||||
copy_from_string(std::basic_string<Char, Traits, Alloc> const& s, std::size_t pos, std::size_t n) {
|
||||
copy_from_string(s, pos, n, Char('0'), Char('1'));
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
void
|
||||
SPROUT_NON_CONSTEXPR void
|
||||
copy_to_string(std::basic_string<Char, Traits, Alloc>& s) const {
|
||||
copy_to_string(s, Char('0'), Char('1'));
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ namespace sprout {
|
|||
: base_type(sprout::detail::sanitize_val<N>::do_sanitize_val(val))
|
||||
{}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
explicit bitset(std::basic_string<Char, Traits, Alloc> const& s, std::size_t position = 0)
|
||||
explicit SPROUT_NON_CONSTEXPR bitset(std::basic_string<Char, Traits, Alloc> const& s, std::size_t position = 0)
|
||||
: base_type()
|
||||
{
|
||||
if (position > s.size()) {
|
||||
|
@ -1085,7 +1085,7 @@ namespace sprout {
|
|||
copy_from_string(s, position, std::basic_string<Char, Traits, Alloc>::npos, Char('0'), Char('1'));
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
bitset(std::basic_string<Char, Traits, Alloc> const& s, std::size_t position, std::size_t n)
|
||||
SPROUT_NON_CONSTEXPR bitset(std::basic_string<Char, Traits, Alloc> const& s, std::size_t position, std::size_t n)
|
||||
: base_type()
|
||||
{
|
||||
if (position > s.size()) {
|
||||
|
@ -1095,7 +1095,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
bitset(
|
||||
SPROUT_NON_CONSTEXPR bitset(
|
||||
std::basic_string<Char, Traits, Alloc> const& s, std::size_t position, std::size_t n,
|
||||
Char zero, Char one = Char('1')
|
||||
)
|
||||
|
@ -1107,7 +1107,7 @@ namespace sprout {
|
|||
copy_from_string(s, position, n, zero, one);
|
||||
}
|
||||
template<typename Char>
|
||||
explicit bitset(
|
||||
explicit SPROUT_NON_CONSTEXPR bitset(
|
||||
Char const* str, typename std::basic_string<Char>::std::size_type n = std::basic_string<Char>::npos,
|
||||
Char zero = Char('0'), Char one = Char('1')
|
||||
)
|
||||
|
@ -1248,44 +1248,44 @@ namespace sprout {
|
|||
return this->do_to_ullong();
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
std::basic_string<Char, Traits, Alloc>
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<Char, Traits, Alloc>
|
||||
to_string() const {
|
||||
std::basic_string<Char, Traits, Alloc> result;
|
||||
copy_to_string(result, Char('0'), Char('1'));
|
||||
return result;
|
||||
}
|
||||
template<typename Char, typename Traits, typename Alloc>
|
||||
std::basic_string<Char, Traits, Alloc>
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<Char, Traits, Alloc>
|
||||
to_string(Char zero, Char one = Char('1')) const {
|
||||
std::basic_string<Char, Traits, Alloc> result;
|
||||
copy_to_string(result, zero, one);
|
||||
return result;
|
||||
}
|
||||
template<typename Char, typename Traits>
|
||||
std::basic_string<Char, Traits, std::allocator<Char> >
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<Char, Traits, std::allocator<Char> >
|
||||
to_string() const {
|
||||
return to_string<Char, Traits, std::allocator<Char> >();
|
||||
}
|
||||
template<typename Char, typename Traits>
|
||||
std::basic_string<Char, Traits, std::allocator<Char> >
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<Char, Traits, std::allocator<Char> >
|
||||
to_string(Char zero, Char one = Char('1')) const {
|
||||
return to_string<Char, Traits, std::allocator<Char> >(zero, one);
|
||||
}
|
||||
template<class Char>
|
||||
std::basic_string<Char, std::char_traits<Char>, std::allocator<Char> >
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<Char, std::char_traits<Char>, std::allocator<Char> >
|
||||
to_string() const {
|
||||
return to_string<Char, std::char_traits<Char>, std::allocator<Char> >();
|
||||
}
|
||||
template<class Char>
|
||||
std::basic_string<Char, std::char_traits<Char>, std::allocator<Char> >
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<Char, std::char_traits<Char>, std::allocator<Char> >
|
||||
to_string(Char zero, Char one = Char('1')) const {
|
||||
return to_string<Char, std::char_traits<Char>, std::allocator<Char> >(zero, one);
|
||||
}
|
||||
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<char, std::char_traits<char>, std::allocator<char> >
|
||||
to_string() const {
|
||||
return to_string<char, std::char_traits<char>, std::allocator<char> >();
|
||||
}
|
||||
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
|
||||
SPROUT_NON_CONSTEXPR std::basic_string<char, std::char_traits<char>, std::allocator<char> >
|
||||
to_string(char zero, char one = '1') const {
|
||||
return to_string<char, std::char_traits<char>, std::allocator<char> >(zero, one);
|
||||
}
|
||||
|
@ -1359,10 +1359,10 @@ namespace sprout {
|
|||
friend SPROUT_CONSTEXPR sprout::bitset<M>
|
||||
sprout::operator^(sprout::bitset<M> const& lhs, sprout::bitset<M> const& rhs) SPROUT_NOEXCEPT;
|
||||
template<typename Char, typename Traits, std::size_t M>
|
||||
friend std::basic_istream<Char, Traits>&
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Char, Traits>&
|
||||
sprout::operator>>(std::basic_istream<Char, Traits>& lhs, sprout::bitset<M>& rhs);
|
||||
template<typename Char, typename Traits, std::size_t M>
|
||||
friend std::basic_ostream<Char, Traits>&
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Char, Traits>&
|
||||
sprout::operator<<(std::basic_ostream<Char, Traits>& lhs, sprout::bitset<M> const& rhs);
|
||||
|
||||
template<std::size_t M>
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace sprout {
|
|||
// 20.5.4 bitset operators:
|
||||
|
||||
template<typename Char, typename Traits, std::size_t N>
|
||||
inline std::basic_istream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_istream<Char, Traits>&
|
||||
operator>>(std::basic_istream<Char, Traits>& lhs, sprout::bitset<N>& rhs) {
|
||||
typedef typename Traits::char_type char_type;
|
||||
typedef std::basic_istream<Char, Traits> istream_type;
|
||||
|
@ -66,7 +66,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Char, typename Traits, std::size_t N>
|
||||
inline std::basic_ostream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& lhs, sprout::bitset<N> const& rhs) {
|
||||
std::basic_string<Char, Traits> tmp;
|
||||
std::ctype<Char> const& ct = std::use_facet<std::ctype<Char> >(lhs.getloc());
|
||||
|
|
|
@ -432,7 +432,7 @@ namespace sprout {
|
|||
}
|
||||
}
|
||||
template<typename InputIterator>
|
||||
void process_block_impl(InputIterator first, InputIterator last) {
|
||||
SPROUT_CXX14_CONSTEXPR void process_block_impl(InputIterator first, InputIterator last) {
|
||||
for(; first != last; ++first) {
|
||||
process_byte(*first);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename T, typename Char, typename Traits>
|
||||
std::basic_istream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_istream<Char, Traits>&
|
||||
operator>>(std::basic_istream<Char, Traits>& lhs, sprout::complex<T>& rhs) {
|
||||
T re, im;
|
||||
Char ch;
|
||||
|
@ -161,7 +161,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename T, typename Char, typename Traits>
|
||||
std::basic_ostream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& lhs, sprout::complex<T> const& rhs) {
|
||||
return lhs << '(' << rhs.real() << ',' << rhs.imag() << ')';
|
||||
}
|
||||
|
|
|
@ -70,19 +70,19 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y)
|
||||
: second_(y)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return first_;
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return first_;
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return second_;
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return second_;
|
||||
}
|
||||
void swap(compressed_pair_impl& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other)
|
||||
SPROUT_NOEXCEPT_EXPR(
|
||||
SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_))
|
||||
&& SPROUT_NOEXCEPT_EXPR(sprout::swap(second_, other.second_))
|
||||
|
@ -119,19 +119,19 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y)
|
||||
: second_(y)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return *this;
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return second_;
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return second_;
|
||||
}
|
||||
void swap(compressed_pair_impl& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::swap(second_, other.second_)))
|
||||
{
|
||||
sprout::swap(second_, other.second_);
|
||||
|
@ -164,19 +164,19 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y)
|
||||
: second_type(y)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return first_;
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return first_;
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return *this;
|
||||
}
|
||||
void swap(compressed_pair_impl& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_)))
|
||||
{
|
||||
sprout::swap(first_, other.first_);
|
||||
|
@ -208,19 +208,19 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR compressed_pair_impl(second_param_type y)
|
||||
: second_type(y)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return *this;
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return *this;
|
||||
}
|
||||
void swap(compressed_pair_impl&) {}
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl&) {}
|
||||
};
|
||||
template<typename T1, typename T2>
|
||||
class compressed_pair_impl<T1, T2, 4>
|
||||
|
@ -247,19 +247,19 @@ namespace sprout {
|
|||
: first_type(x)
|
||||
, second_(x)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return *this;
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return second_;
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return second_;
|
||||
}
|
||||
void swap(compressed_pair_impl&) {}
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl&) {}
|
||||
};
|
||||
template<typename T1, typename T2>
|
||||
class compressed_pair_impl<T1, T2, 5>
|
||||
|
@ -286,19 +286,19 @@ namespace sprout {
|
|||
: first_(x)
|
||||
, second_(x)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return first_;
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return first_;
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return second_;
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return second_;
|
||||
}
|
||||
void swap(compressed_pair_impl& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair_impl& other)
|
||||
SPROUT_NOEXCEPT_EXPR(
|
||||
SPROUT_NOEXCEPT_EXPR(sprout::swap(first_, other.first_))
|
||||
&& SPROUT_NOEXCEPT_EXPR(sprout::swap(second_, other.second_))
|
||||
|
@ -355,19 +355,19 @@ namespace sprout {
|
|||
explicit SPROUT_CONSTEXPR compressed_pair(second_param_type y)
|
||||
: base_type(y)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return base_type::first();
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return base_type::first();
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return base_type::second();
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return base_type::second();
|
||||
}
|
||||
void swap(compressed_pair& other) {
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair& other) {
|
||||
base_type::swap(other);
|
||||
}
|
||||
};
|
||||
|
@ -410,19 +410,19 @@ namespace sprout {
|
|||
explicit SPROUT_CONSTEXPR compressed_pair(first_param_type x)
|
||||
: base_type(x)
|
||||
{}
|
||||
first_reference first() {
|
||||
SPROUT_CXX14_CONSTEXPR first_reference first() {
|
||||
return base_type::first();
|
||||
}
|
||||
SPROUT_CONSTEXPR first_const_reference first() const {
|
||||
return base_type::first();
|
||||
}
|
||||
second_reference second() {
|
||||
SPROUT_CXX14_CONSTEXPR second_reference second() {
|
||||
return base_type::second();
|
||||
}
|
||||
SPROUT_CONSTEXPR second_const_reference second() const {
|
||||
return base_type::second();
|
||||
}
|
||||
void swap(compressed_pair& other) {
|
||||
SPROUT_CXX14_CONSTEXPR void swap(compressed_pair& other) {
|
||||
base_type::swap(other);
|
||||
}
|
||||
};
|
||||
|
@ -430,7 +430,7 @@ namespace sprout {
|
|||
// swap
|
||||
//
|
||||
template<typename T1, typename T2>
|
||||
inline void
|
||||
inline SPROUT_CXX14_CONSTEXPR void
|
||||
swap(sprout::compressed_pair<T1, T2>& lhs, sprout::compressed_pair<T1, T2>& rhs)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
|
||||
{
|
||||
|
|
|
@ -49,6 +49,11 @@
|
|||
# define SPROUT_INITIALIZER_LIST_CONSTEXPR
|
||||
#endif // #ifndef SPROUT_NO_CXX14_INITIALIZER_LIST
|
||||
|
||||
//
|
||||
// SPROUT_NON_CONSTEXPR
|
||||
//
|
||||
#define SPROUT_NON_CONSTEXPR
|
||||
|
||||
//
|
||||
// SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL
|
||||
// SPROUT_DEFAULTED_DESTRUCTOR_DECL
|
||||
|
|
|
@ -52,19 +52,19 @@ namespace sprout {
|
|||
{}
|
||||
container_holder(container_holder const&) = default;
|
||||
|
||||
void swap(container_holder& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(container_holder& other)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(sprout::swap(other.container, container)))
|
||||
{
|
||||
sprout::swap(other.container, container);
|
||||
}
|
||||
// iterators:
|
||||
iterator begin() {
|
||||
SPROUT_CXX14_CONSTEXPR iterator begin() {
|
||||
return sprout::begin(*container);
|
||||
}
|
||||
SPROUT_CONSTEXPR const_iterator begin() const {
|
||||
return sprout::begin(*container);
|
||||
}
|
||||
iterator end() {
|
||||
SPROUT_CXX14_CONSTEXPR iterator end() {
|
||||
return sprout::end(*container);
|
||||
}
|
||||
SPROUT_CONSTEXPR const_iterator end() const {
|
||||
|
@ -84,20 +84,20 @@ namespace sprout {
|
|||
return sprout::empty(*container);
|
||||
}
|
||||
|
||||
param_type get_internal() {
|
||||
SPROUT_CXX14_CONSTEXPR param_type get_internal() {
|
||||
return *container;
|
||||
}
|
||||
SPROUT_CONSTEXPR const_param_type get_internal() const {
|
||||
return *container;
|
||||
}
|
||||
// element access:
|
||||
reference operator[](size_type i) {
|
||||
SPROUT_CXX14_CONSTEXPR reference operator[](size_type i) {
|
||||
return *sprout::next(begin(), i);
|
||||
}
|
||||
SPROUT_CONSTEXPR const_reference operator[](size_type i) const {
|
||||
return *sprout::next(begin(), i);
|
||||
}
|
||||
reference at(size_type i) {
|
||||
SPROUT_CXX14_CONSTEXPR reference at(size_type i) {
|
||||
return i < size() ? (*this)[i]
|
||||
: (throw std::out_of_range("container_holder<>: index out of range"), (*this)[i])
|
||||
;
|
||||
|
@ -107,13 +107,13 @@ namespace sprout {
|
|||
: (throw std::out_of_range("container_holder<>: index out of range"), (*this)[i])
|
||||
;
|
||||
}
|
||||
reference front() {
|
||||
SPROUT_CXX14_CONSTEXPR reference front() {
|
||||
return *begin();
|
||||
}
|
||||
SPROUT_CONSTEXPR const_reference front() const {
|
||||
return *begin();
|
||||
}
|
||||
reference back() {
|
||||
SPROUT_CXX14_CONSTEXPR reference back() {
|
||||
return *sprout::next(begin(), size() - 1);
|
||||
}
|
||||
SPROUT_CONSTEXPR const_reference back() const {
|
||||
|
@ -125,7 +125,7 @@ namespace sprout {
|
|||
// swap
|
||||
//
|
||||
template<typename Container>
|
||||
inline void
|
||||
inline SPROUT_CXX14_CONSTEXPR void
|
||||
swap(sprout::container_holder<Container>& lhs, sprout::container_holder<Container>& rhs)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)))
|
||||
{
|
||||
|
|
|
@ -29,18 +29,18 @@ namespace sprout {
|
|||
private:
|
||||
ios_flags_saver& operator=(ios_flags_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit ios_flags_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR ios_flags_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.flags())
|
||||
{}
|
||||
ios_flags_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR ios_flags_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.flags(a))
|
||||
{}
|
||||
~ios_flags_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_flags_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.flags(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -55,18 +55,18 @@ namespace sprout {
|
|||
private:
|
||||
ios_precision_saver& operator=(ios_precision_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit ios_precision_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR ios_precision_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.precision())
|
||||
, a_save_(s.precision())
|
||||
{}
|
||||
ios_precision_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR ios_precision_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.precision(a))
|
||||
{}
|
||||
~ios_precision_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_precision_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.precision(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -81,18 +81,18 @@ namespace sprout {
|
|||
private:
|
||||
ios_width_saver& operator=(ios_width_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit ios_width_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR ios_width_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.width())
|
||||
{}
|
||||
ios_width_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR ios_width_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.width(a))
|
||||
{}
|
||||
~ios_width_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_width_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.width(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -108,20 +108,20 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_iostate_saver& operator=(basic_ios_iostate_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_iostate_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_iostate_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdstate())
|
||||
{}
|
||||
basic_ios_iostate_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR basic_ios_iostate_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdstate())
|
||||
{
|
||||
s.clear(a);
|
||||
}
|
||||
~basic_ios_iostate_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_iostate_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.clear(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -137,20 +137,20 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_exception_saver& operator=(basic_ios_exception_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_exception_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_exception_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.exceptions())
|
||||
{}
|
||||
basic_ios_exception_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR basic_ios_exception_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.exceptions())
|
||||
{
|
||||
s.exceptions(a);
|
||||
}
|
||||
~basic_ios_exception_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_exception_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.exceptions(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -166,18 +166,18 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_tie_saver& operator=(basic_ios_tie_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_tie_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_tie_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.tie())
|
||||
{}
|
||||
basic_ios_tie_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR basic_ios_tie_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.tie(a))
|
||||
{}
|
||||
~basic_ios_tie_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_tie_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.tie(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -193,18 +193,18 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_rdbuf_saver& operator=(basic_ios_rdbuf_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_rdbuf_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_rdbuf_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdbuf())
|
||||
{}
|
||||
basic_ios_rdbuf_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR basic_ios_rdbuf_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.rdbuf(a))
|
||||
{}
|
||||
~basic_ios_rdbuf_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_rdbuf_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.rdbuf(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -220,18 +220,18 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_fill_saver& operator=(basic_ios_fill_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_fill_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_fill_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.fill())
|
||||
{}
|
||||
basic_ios_fill_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR basic_ios_fill_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.fill(a))
|
||||
{}
|
||||
~basic_ios_fill_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_fill_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.fill(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -247,18 +247,18 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_locale_saver& operator=(basic_ios_locale_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_locale_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_locale_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a_save_(s.getloc())
|
||||
{}
|
||||
basic_ios_locale_saver(state_type& s, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR basic_ios_locale_saver(state_type& s, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.imbue(a))
|
||||
{}
|
||||
~basic_ios_locale_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_locale_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.imbue(a_save_);
|
||||
}
|
||||
};
|
||||
|
@ -275,22 +275,22 @@ namespace sprout {
|
|||
private:
|
||||
ios_iword_saver& operator=(ios_iword_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit ios_iword_saver(state_type& s, index_type i)
|
||||
explicit SPROUT_NON_CONSTEXPR ios_iword_saver(state_type& s, index_type i)
|
||||
: s_save_(s)
|
||||
, a_save_(s.iword(i))
|
||||
, i_save_(i)
|
||||
{}
|
||||
ios_iword_saver(state_type& s, index_type i, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR ios_iword_saver(state_type& s, index_type i, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.iword(i))
|
||||
, i_save_(i)
|
||||
{
|
||||
s.iword(i) = a;
|
||||
}
|
||||
~ios_iword_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_iword_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.iword(i_save_) = a_save_;
|
||||
}
|
||||
};
|
||||
|
@ -307,22 +307,22 @@ namespace sprout {
|
|||
private:
|
||||
ios_pword_saver& operator=(ios_pword_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit ios_pword_saver(state_type& s, index_type i)
|
||||
explicit SPROUT_NON_CONSTEXPR ios_pword_saver(state_type& s, index_type i)
|
||||
: s_save_(s)
|
||||
, a_save_(s.pword(i))
|
||||
, i_save_(i)
|
||||
{}
|
||||
ios_pword_saver(state_type& s, index_type i, aspect_type const& a)
|
||||
SPROUT_NON_CONSTEXPR ios_pword_saver(state_type& s, index_type i, aspect_type const& a)
|
||||
: s_save_(s)
|
||||
, a_save_(s.pword(i))
|
||||
, i_save_(i)
|
||||
{
|
||||
s.pword(i) = a;
|
||||
}
|
||||
~ios_pword_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_pword_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.pword(i_save_) = a_save_;
|
||||
}
|
||||
};
|
||||
|
@ -338,16 +338,16 @@ namespace sprout {
|
|||
private:
|
||||
ios_base_all_saver& operator=(ios_base_all_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit ios_base_all_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR ios_base_all_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a1_save_(s.flags())
|
||||
, a2_save_(s.precision())
|
||||
, a3_save_(s.width())
|
||||
{}
|
||||
~ios_base_all_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_base_all_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.width(a3_save_);
|
||||
s_save_.precision(a2_save_);
|
||||
s_save_.flags(a1_save_);
|
||||
|
@ -372,7 +372,7 @@ namespace sprout {
|
|||
private:
|
||||
basic_ios_all_saver& operator=(basic_ios_all_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
explicit basic_ios_all_saver(state_type& s)
|
||||
explicit SPROUT_NON_CONSTEXPR basic_ios_all_saver(state_type& s)
|
||||
: s_save_(s)
|
||||
, a1_save_(s.flags())
|
||||
, a2_save_(s.precision())
|
||||
|
@ -384,10 +384,10 @@ namespace sprout {
|
|||
, a8_save_(s.fill())
|
||||
, a9_save_(s.getloc())
|
||||
{}
|
||||
~basic_ios_all_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~basic_ios_all_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.imbue(a9_save_);
|
||||
s_save_.fill(a8_save_);
|
||||
s_save_.rdbuf(a7_save_);
|
||||
|
@ -412,16 +412,16 @@ namespace sprout {
|
|||
private:
|
||||
ios_all_word_saver& operator=(ios_all_word_saver const&) SPROUT_DELETED_FUNCTION_DECL
|
||||
public:
|
||||
ios_all_word_saver(state_type& s, index_type i)
|
||||
SPROUT_NON_CONSTEXPR ios_all_word_saver(state_type& s, index_type i)
|
||||
: s_save_(s)
|
||||
, i_save_(i)
|
||||
, a1_save_(s.iword(i))
|
||||
, a2_save_(s.pword(i))
|
||||
{}
|
||||
~ios_all_word_saver() {
|
||||
SPROUT_NON_CONSTEXPR ~ios_all_word_saver() {
|
||||
this->restore();
|
||||
}
|
||||
void restore() {
|
||||
SPROUT_NON_CONSTEXPR void restore() {
|
||||
s_save_.pword(i_save_) = a2_save_;
|
||||
s_save_.iword(i_save_) = a1_save_;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace sprout {
|
|||
iterator_type last;
|
||||
Predicate pred;
|
||||
private:
|
||||
void satisfy_predicate() {
|
||||
SPROUT_CXX14_CONSTEXPR void satisfy_predicate() {
|
||||
current = sprout::adjacent_find(current, last, pred);
|
||||
}
|
||||
SPROUT_CONSTEXPR adjacent_filter_iterator(Predicate pred, iterator_type it, iterator_type last, private_construct_t)
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace sprout {
|
|||
return *this;
|
||||
}
|
||||
|
||||
void swap(front_insert_iterator& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(front_insert_iterator& other)
|
||||
SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(base_type::swap(other)))
|
||||
{
|
||||
base_type::swap(other);
|
||||
|
|
|
@ -22,26 +22,26 @@ namespace sprout {
|
|||
// get_default_indeterminate_name
|
||||
//
|
||||
template<typename Char>
|
||||
inline std::basic_string<Char>
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_string<Char>
|
||||
get_default_indeterminate_name();
|
||||
template<>
|
||||
inline std::basic_string<char>
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_string<char>
|
||||
get_default_indeterminate_name<char>() {
|
||||
return "indeterminate";
|
||||
}
|
||||
template<>
|
||||
inline std::basic_string<wchar_t>
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_string<wchar_t>
|
||||
get_default_indeterminate_name<wchar_t>() {
|
||||
return L"indeterminate";
|
||||
}
|
||||
#if SPROUT_USE_UNICODE_LITERALS
|
||||
template<>
|
||||
inline std::basic_string<char16_t>
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_string<char16_t>
|
||||
get_default_indeterminate_name<char16_t>() {
|
||||
return u"indeterminate";
|
||||
}
|
||||
template<>
|
||||
inline std::basic_string<char32_t>
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_string<char32_t>
|
||||
get_default_indeterminate_name<char32_t>() {
|
||||
return U"indeterminate";
|
||||
}
|
||||
|
@ -63,13 +63,13 @@ namespace sprout {
|
|||
private:
|
||||
string_type name_;
|
||||
public:
|
||||
indeterminate_name()
|
||||
SPROUT_NON_CONSTEXPR indeterminate_name()
|
||||
: name_(sprout::logic::get_default_indeterminate_name<char_type>())
|
||||
{}
|
||||
explicit indeterminate_name(string_type const& initial_name)
|
||||
explicit SPROUT_NON_CONSTEXPR indeterminate_name(string_type const& initial_name)
|
||||
: name_(initial_name)
|
||||
{}
|
||||
string_type name() const {
|
||||
SPROUT_NON_CONSTEXPR string_type name() const {
|
||||
return name_;
|
||||
}
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ namespace sprout {
|
|||
// operator<<
|
||||
//
|
||||
template<typename Char, typename Traits>
|
||||
inline std::basic_ostream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& lhs, sprout::logic::tribool rhs) {
|
||||
if (!sprout::logic::indeterminate(rhs)) {
|
||||
lhs << static_cast<bool>(rhs);
|
||||
|
@ -104,7 +104,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Char, typename Traits>
|
||||
inline std::basic_ostream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& lhs, sprout::logic::indeterminate_keyword_t) {
|
||||
return lhs << sprout::logic::tribool(indeterminate);
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ namespace sprout {
|
|||
// operator>>
|
||||
//
|
||||
template<typename Char, typename Traits>
|
||||
inline std::basic_istream<Char, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_istream<Char, Traits>&
|
||||
operator>>(std::basic_istream<Char, Traits>& lhs, sprout::logic::tribool& rhs) {
|
||||
if (lhs.flags() & std::ios_base::boolalpha) {
|
||||
typename std::basic_istream<Char, Traits>::sentry cerberus(lhs);
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace sprout {
|
|||
private:
|
||||
struct dummy {
|
||||
public:
|
||||
void nonnull() {}
|
||||
SPROUT_CXX14_CONSTEXPR void nonnull() {}
|
||||
};
|
||||
typedef void (dummy::*safe_bool)();
|
||||
public:
|
||||
|
|
|
@ -213,7 +213,7 @@ namespace sprout {
|
|||
SPROUT_CXX14_CONSTEXPR void assign(sprout::nullopt_t) SPROUT_NOEXCEPT {
|
||||
destroy();
|
||||
}
|
||||
void assign(optional const& v) {
|
||||
SPROUT_CXX14_CONSTEXPR void assign(optional const& v) {
|
||||
optional temp(v);
|
||||
temp.swap(*this);
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
additive_combine_engine& rhs
|
||||
)
|
||||
|
@ -106,7 +106,7 @@ namespace sprout {
|
|||
return lhs >> rhs.mlcg1_ >> std::ws >> rhs.mlcg2_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
additive_combine_engine const& rhs
|
||||
)
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace sprout {
|
|||
return p_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -59,7 +59,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -109,7 +109,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(p_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
p_ = parm.p();
|
||||
}
|
||||
template<typename Engine>
|
||||
|
@ -120,7 +120,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
bernoulli_distribution& rhs
|
||||
)
|
||||
|
@ -132,7 +132,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
bernoulli_distribution const& rhs
|
||||
)
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace sprout {
|
|||
return p_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -120,7 +120,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -598,7 +598,7 @@ namespace sprout {
|
|||
generate2(IntType t, Engine const& eng) const {
|
||||
return generate2_0<Engine>(t, generate(eng));
|
||||
}
|
||||
void init() {
|
||||
SPROUT_CXX14_CONSTEXPR void init() {
|
||||
m_ = init_m(t_, p_);
|
||||
if (use_inversion()) {
|
||||
q_n_ = init_q_n(t_, p_);
|
||||
|
@ -643,7 +643,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(t_, p_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
t_ = parm.t();
|
||||
p_ = parm.p();
|
||||
init();
|
||||
|
@ -659,7 +659,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
binomial_distribution& rhs
|
||||
)
|
||||
|
@ -671,7 +671,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
binomial_distribution const& rhs
|
||||
)
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace sprout {
|
|||
return p_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -63,7 +63,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -124,7 +124,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(p_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
p_ = parm.p();
|
||||
log_1mp_ = init_log_1mp(p_);
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ namespace sprout {
|
|||
return generate(eng);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
geometric_distribution& rhs
|
||||
)
|
||||
|
@ -145,7 +145,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
geometric_distribution const& rhs
|
||||
)
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
inversive_congruential_engine& rhs
|
||||
)
|
||||
|
@ -106,7 +106,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
inversive_congruential_engine const& rhs
|
||||
)
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
linear_congruential_engine& rhs
|
||||
)
|
||||
|
@ -108,7 +108,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
linear_congruential_engine const& rhs
|
||||
)
|
||||
|
@ -196,7 +196,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
rand48& rhs
|
||||
)
|
||||
|
@ -204,7 +204,7 @@ namespace sprout {
|
|||
return lhs >> rhs.lcf_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
rand48 const& rhs
|
||||
)
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
linear_feedback_shift_engine& rhs
|
||||
)
|
||||
|
@ -96,7 +96,7 @@ namespace sprout {
|
|||
return lhs >> rhs.x_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
linear_feedback_shift_engine const& rhs
|
||||
)
|
||||
|
|
|
@ -402,7 +402,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
mersenne_twister_engine& rhs
|
||||
)
|
||||
|
@ -414,7 +414,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
mersenne_twister_engine const& rhs
|
||||
)
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace sprout {
|
|||
return sigma_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -80,7 +80,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -200,7 +200,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(mean_, sigma_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
mean_ = parm.mean();
|
||||
sigma_ = parm.sigma();
|
||||
valid_ = false;
|
||||
|
@ -210,7 +210,7 @@ namespace sprout {
|
|||
return generate(eng);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
normal_distribution& rhs
|
||||
)
|
||||
|
@ -230,7 +230,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
normal_distribution const& rhs
|
||||
)
|
||||
|
|
|
@ -259,7 +259,7 @@ namespace sprout {
|
|||
friend SPROUT_CONSTEXPR bool operator!=(random_result const& lhs, random_result const& rhs) SPROUT_NOEXCEPT {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
void swap(random_result& other)
|
||||
SPROUT_CXX14_CONSTEXPR void swap(random_result& other)
|
||||
SPROUT_NOEXCEPT_EXPR(
|
||||
SPROUT_NOEXCEPT_EXPR(sprout::swap(result_, other.result_))
|
||||
&& SPROUT_NOEXCEPT_EXPR(sprout::swap(engine_, other.engine_))
|
||||
|
|
|
@ -161,7 +161,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
shuffle_order_engine& rhs
|
||||
)
|
||||
|
@ -174,7 +174,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
shuffle_order_engine const& rhs
|
||||
)
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace sprout {
|
|||
typedef uniform_01 distribution_type;
|
||||
public:
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type&
|
||||
)
|
||||
|
@ -44,7 +44,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const&
|
||||
)
|
||||
|
@ -132,13 +132,13 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type();
|
||||
}
|
||||
void param(param_type const&) {}
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const&) {}
|
||||
template<typename Engine>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_01> operator()(Engine const& eng) const {
|
||||
return generate(eng, eng());
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
uniform_01&
|
||||
)
|
||||
|
@ -146,7 +146,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
uniform_01 const&
|
||||
)
|
||||
|
|
|
@ -715,7 +715,7 @@ namespace sprout {
|
|||
return max_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -733,7 +733,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -787,7 +787,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(min_, max_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
min_ = parm.a();
|
||||
max_ = parm.b();
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ namespace sprout {
|
|||
return generate<Engine>(sprout::random::detail::generate_uniform_int(eng, min_, max_));
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
uniform_int_distribution& rhs
|
||||
)
|
||||
|
@ -808,7 +808,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
uniform_int_distribution const& rhs
|
||||
)
|
||||
|
|
|
@ -369,7 +369,7 @@ namespace sprout {
|
|||
return max_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -387,7 +387,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -441,7 +441,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(min_, max_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
min_ = parm.a();
|
||||
max_ = parm.b();
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ namespace sprout {
|
|||
return generate<Engine>(sprout::random::detail::generate_uniform_real(eng, min_, max_));
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
uniform_real_distribution& rhs
|
||||
)
|
||||
|
@ -462,7 +462,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
uniform_real_distribution const& rhs
|
||||
)
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace sprout {
|
|||
return max_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
)
|
||||
|
@ -71,7 +71,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
)
|
||||
|
@ -222,7 +222,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type(min_, max_);
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
SPROUT_CXX14_CONSTEXPR void param(param_type const& parm) {
|
||||
min_ = parm.a();
|
||||
max_ = parm.b();
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ namespace sprout {
|
|||
return generate(eng, typename std::is_integral<base_result>::type());
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
uniform_smallint& rhs
|
||||
)
|
||||
|
@ -244,7 +244,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
uniform_smallint const& rhs
|
||||
)
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace sprout {
|
|||
return !(lhs == rhs);
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
xor_combine_engine& rhs
|
||||
)
|
||||
|
@ -94,7 +94,7 @@ namespace sprout {
|
|||
return lhs >> rhs.rng1_ >> std::ws >> rhs.rng2_;
|
||||
}
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
xor_combine_engine const& rhs
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
// operator<<
|
||||
//
|
||||
template<typename Elem, typename Traits, typename IntType>
|
||||
inline std::basic_istream<Elem, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>&
|
||||
operator>>(std::basic_istream<Elem, Traits>& lhs, sprout::rational<IntType>& rhs) {
|
||||
IntType n = IntType(0);
|
||||
IntType d = IntType(1);
|
||||
|
@ -39,7 +39,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename Elem, typename Traits, typename IntType>
|
||||
inline std::basic_ostream<Elem, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>&
|
||||
operator<<(std::basic_ostream<Elem, Traits>& lhs, sprout::rational<IntType> const& rhs) {
|
||||
return lhs << rhs.numerator() << Elem('/') << rhs.denominator();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
// operator<<
|
||||
//
|
||||
template<typename T, std::size_t N, typename Traits, typename StreamTraits>
|
||||
inline std::basic_istream<T, StreamTraits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_istream<T, StreamTraits>&
|
||||
operator>>(std::basic_istream<T, StreamTraits>& lhs, sprout::basic_string<T, N, Traits>& rhs) {
|
||||
typedef T elem_type;
|
||||
typedef StreamTraits traits_type;
|
||||
|
@ -62,7 +62,7 @@ namespace sprout {
|
|||
return lhs;
|
||||
}
|
||||
template<typename T, std::size_t N, typename Traits, typename StreamTraits>
|
||||
inline std::basic_ostream<T, StreamTraits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<T, StreamTraits>&
|
||||
operator<<(std::basic_ostream<T, StreamTraits>& lhs, sprout::basic_string<T, N, Traits> const& rhs) {
|
||||
return lhs << rhs.c_str();
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ namespace sprout {
|
|||
static SPROUT_CONSTEXPR basic_string from_c_str(T const* s) {
|
||||
return basic_string(s);
|
||||
}
|
||||
static SPROUT_CONSTEXPR basic_string from_c_str(std::basic_string<T, Traits> const& s) {
|
||||
static SPROUT_NON_CONSTEXPR basic_string from_c_str(std::basic_string<T, Traits> const& s) {
|
||||
return from_c_str(s.data(), s.size());
|
||||
}
|
||||
private:
|
||||
|
@ -759,7 +759,7 @@ namespace sprout {
|
|||
}
|
||||
// conversions:
|
||||
template<typename Allocator>
|
||||
SPROUT_EXPLICIT_CONVERSION operator std::basic_string<T, Traits, Allocator>() const {
|
||||
SPROUT_EXPLICIT_CONVERSION SPROUT_NON_CONSTEXPR operator std::basic_string<T, Traits, Allocator>() const {
|
||||
return std::basic_string<T, Traits, Allocator>(data(), size());
|
||||
}
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ namespace sprout {
|
|||
return sprout::basic_string<T, N>::from_c_str(s);
|
||||
}
|
||||
template<std::size_t N, typename T, typename Traits>
|
||||
inline SPROUT_CONSTEXPR sprout::basic_string<T, N, Traits>
|
||||
inline SPROUT_NON_CONSTEXPR sprout::basic_string<T, N, Traits>
|
||||
string_from_c_str(std::basic_string<T, Traits> const& s) {
|
||||
return sprout::basic_string<T, N, Traits>::from_c_str(s);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
// operator<<
|
||||
//
|
||||
template<typename T, typename Traits, typename StreamTraits>
|
||||
inline std::basic_ostream<T, StreamTraits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<T, StreamTraits>&
|
||||
operator<<(std::basic_ostream<T, StreamTraits>& lhs, sprout::basic_string_ref<T, Traits> const& rhs) {
|
||||
sprout::copy(rhs.begin(), rhs.end(), std::ostreambuf_iterator<T, StreamTraits>(lhs));
|
||||
return lhs;
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace sprout {
|
|||
: ptr_(str.data()), len_(str.size())
|
||||
{}
|
||||
template<typename Allocator>
|
||||
SPROUT_CONSTEXPR basic_string_ref(std::basic_string<T, Traits, Allocator> const& str)
|
||||
SPROUT_NON_CONSTEXPR basic_string_ref(std::basic_string<T, Traits, Allocator> const& str)
|
||||
: ptr_(str.data()), len_(str.size())
|
||||
{}
|
||||
SPROUT_CONSTEXPR basic_string_ref(const_pointer str, size_type len)
|
||||
|
@ -411,7 +411,7 @@ namespace sprout {
|
|||
}
|
||||
// others:
|
||||
template<typename Allocator>
|
||||
SPROUT_EXPLICIT_CONVERSION operator std::basic_string<T, Traits, Allocator>() const {
|
||||
SPROUT_EXPLICIT_CONVERSION SPROUT_NON_CONSTEXPR operator std::basic_string<T, Traits, Allocator>() const {
|
||||
return std::basic_string<T, Traits, Allocator>(data(), size());
|
||||
}
|
||||
SPROUT_CONSTEXPR const_pointer
|
||||
|
@ -584,7 +584,7 @@ namespace sprout {
|
|||
return sprout::basic_string_ref<T, Traits>(s);
|
||||
}
|
||||
template<typename T, typename Traits>
|
||||
inline SPROUT_CONSTEXPR sprout::basic_string_ref<T, Traits>
|
||||
inline SPROUT_NON_CONSTEXPR sprout::basic_string_ref<T, Traits>
|
||||
to_string_ref(std::basic_string<T, Traits> const& s) {
|
||||
return sprout::basic_string_ref<T, Traits>(s);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace sprout {
|
|||
// operator<<
|
||||
//
|
||||
template<typename Elem, typename Traits>
|
||||
inline std::basic_ostream<Elem, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>&
|
||||
operator<<(std::basic_ostream<Elem, Traits>& lhs, sprout::uuids::uuid const& rhs) {
|
||||
sprout::detail::io::ios_flags_saver flags_saver(lhs);
|
||||
sprout::detail::io::basic_ios_fill_saver<Elem, Traits> fill_saver(lhs);
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace sprout {
|
|||
: out_(out)
|
||||
{}
|
||||
template<typename T>
|
||||
void operator()(T const& operand) const {
|
||||
SPROUT_CXX14_CONSTEXPR void operator()(T const& operand) const {
|
||||
out_ << operand;
|
||||
}
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ namespace sprout {
|
|||
// operator<<
|
||||
//
|
||||
template<typename Elem, typename Traits, typename... Types>
|
||||
inline std::basic_ostream<Elem, Traits>&
|
||||
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>&
|
||||
operator<<(std::basic_ostream<Elem, Traits>& lhs, sprout::variant<Types...> const& rhs) {
|
||||
sprout::detail::variant_output_visitor<std::basic_ostream<Elem, Traits> > visitor(lhs);
|
||||
rhs.apply_visitor(visitor);
|
||||
|
|
|
@ -187,14 +187,14 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<int I, typename Elem, typename Traits>
|
||||
static typename std::enable_if<
|
||||
static SPROUT_NON_CONSTEXPR typename std::enable_if<
|
||||
static_cast<std::size_t>(I) == sizeof...(Types),
|
||||
std::basic_ostream<Elem, Traits>&
|
||||
>::type output(std::basic_ostream<Elem, Traits>& os, tuple_type const&, int) {
|
||||
return os;
|
||||
}
|
||||
template<int I, typename Elem, typename Traits>
|
||||
static typename std::enable_if<
|
||||
static SPROUT_NON_CONSTEXPR typename std::enable_if<
|
||||
static_cast<std::size_t>(I) != sizeof...(Types),
|
||||
std::basic_ostream<Elem, Traits>&
|
||||
>::type output(std::basic_ostream<Elem, Traits>& os, tuple_type const& t, int which) {
|
||||
|
@ -288,7 +288,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(std::basic_ostream<Elem, Traits>& lhs, variant const& rhs) {
|
||||
friend SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>& operator<<(std::basic_ostream<Elem, Traits>& lhs, variant const& rhs) {
|
||||
return output<0>(lhs, rhs.tuple_, rhs.which_);
|
||||
}
|
||||
// get support
|
||||
|
|
Loading…
Reference in a new issue