mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix explicit conversion: optional::operator bool, string::operator std::string, string_ref::operator std::string
This commit is contained in:
parent
e5efbfe340
commit
7f6081e0cc
5 changed files with 15 additions and 16 deletions
|
@ -390,12 +390,10 @@ namespace sprout {
|
|||
return size() >= str.size() && traits_type::compare(data() + size() - str.size(), str.data(), str.size()) == 0;
|
||||
}
|
||||
// others:
|
||||
#if SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS
|
||||
template<typename Allocator>
|
||||
explicit operator std::basic_string<T, Traits, Allocator>() const {
|
||||
SPROUT_EXPLICIT_CONVERSION operator std::basic_string<T, Traits, Allocator>() const {
|
||||
return std::basic_string<T, Traits, Allocator>(data(), size());
|
||||
}
|
||||
#endif
|
||||
pointer
|
||||
c_array() SPROUT_NOEXCEPT {
|
||||
return data();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue