fix explicit conversion: optional::operator bool, string::operator std::string, string_ref::operator std::string

This commit is contained in:
bolero-MURAKAMI 2013-05-28 12:36:36 +09:00
parent e5efbfe340
commit 7f6081e0cc
5 changed files with 15 additions and 16 deletions

View file

@ -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();