Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-08-22 04:02:43 +0400
committerHoward Hinnant <hhinnant@apple.com>2010-08-22 04:02:43 +0400
commitb3371f6f4909a1e2034c69011d0baa1a39b21d48 (patch)
tree46a1498f558a86d95ad909e2b075b2ce1ff59070 /libcxx/include/string
parent86353416a7115dc430b9cd47a1aaeb8f19c34f2c (diff)
Fixing whitespace problems
llvm-svn: 111750
Diffstat (limited to 'libcxx/include/string')
-rw-r--r--libcxx/include/string49
1 files changed, 24 insertions, 25 deletions
diff --git a/libcxx/include/string b/libcxx/include/string
index 2ca5986358ac..8d880a3a0cea 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -71,11 +71,11 @@ struct char_traits
template <> struct char_traits<char>;
template <> struct char_traits<wchar_t>;
-template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
+template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_string
{
-public:
-// types:
+public:
+// types:
typedef traits traits_type;
typedef typename traits_type::char_type value_type;
typedef Allocator allocator_type;
@@ -290,7 +290,7 @@ bool operator==(const charT* lhs, const basic_string<charT, traits, Allocator>&
template<class charT, class traits, class Allocator>
bool operator==(const basic_string<charT,traits,Allocator>& lhs, const charT* rhs);
-template<class charT, class traits, class Allocator>
+template<class charT, class traits, class Allocator>
bool operator!=(const basic_string<charT,traits,Allocator>& lhs,
const basic_string<charT, traits, Allocator>& rhs);
@@ -353,7 +353,7 @@ basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const basic_string<charT, traits, Allocator>& str);
template<class charT, class traits, class Allocator>
-basic_istream<charT, traits>&
+basic_istream<charT, traits>&
getline(basic_istream<charT, traits>& is, basic_string<charT, traits, Allocator>& str,
charT delim);
@@ -876,7 +876,7 @@ char_traits<char32_t>::assign(char_type* __s, size_t __n, char_type __a)
return __r;
}
-#endif
+#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
// basic_string
@@ -932,7 +932,7 @@ __basic_string_common<__b>::__throw_out_of_range() const
extern template class __basic_string_common<true>;
-template<class _CharT, class _Traits, class _Allocator>
+template<class _CharT, class _Traits, class _Allocator>
class basic_string
: private __basic_string_common<true>
{
@@ -956,10 +956,10 @@ public:
#elif defined(_LIBCPP_RAW_ITERATORS)
typedef pointer iterator;
typedef const_pointer const_iterator;
-#else
+#else // defined(_LIBCPP_RAW_ITERATORS)
typedef __wrap_iter<pointer> iterator;
typedef __wrap_iter<const_pointer> const_iterator;
-#endif
+#endif // defined(_LIBCPP_RAW_ITERATORS)
typedef _STD::reverse_iterator<iterator> reverse_iterator;
typedef _STD::reverse_iterator<const_iterator> const_reverse_iterator;
@@ -974,10 +974,10 @@ private:
#if _LIBCPP_BIG_ENDIAN
enum {__short_mask = 0x80};
enum {__long_mask = ~(size_type(~0) >> 1)};
-#else
+#else // _LIBCPP_BIG_ENDIAN
enum {__short_mask = 0x01};
enum {__long_mask = 0x1};
-#endif
+#endif // _LIBCPP_BIG_ENDIAN
enum {__mask = size_type(~0) >> 1};
@@ -1034,7 +1034,7 @@ public:
#ifdef _LIBCPP_MOVE
basic_string(basic_string&& __str);
basic_string(basic_string&& __str, const allocator_type& __a);
-#endif
+#endif // _LIBCPP_MOVE
basic_string(const_pointer __s);
basic_string(const_pointer __s, const allocator_type& __a);
basic_string(const_pointer __s, size_type __n);
@@ -1307,7 +1307,7 @@ private:
void __init(const_pointer __s, size_type __sz, size_type __reserve);
void __init(const_pointer __s, size_type __sz);
void __init(size_type __n, value_type __c);
-
+
template <class _InputIterator>
typename enable_if
<
@@ -1326,7 +1326,7 @@ private:
__init(_ForwardIterator __first, _ForwardIterator __last);
void __grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
- size_type __n_copy, size_type __n_del, size_type __n_add = 0);
+ size_type __n_copy, size_type __n_del, size_type __n_add = 0);
void __grow_by_and_replace(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
size_type __n_copy, size_type __n_del,
size_type __n_add, const_pointer __p_new_stuff);
@@ -1353,7 +1353,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_all_iterators()
#ifdef _LIBCPP_DEBUG
iterator::__remove_all(this);
const_iterator::__remove_all(this);
-#endif
+#endif // _LIBCPP_DEBUG
}
template <class _CharT, class _Traits, class _Allocator>
@@ -1393,7 +1393,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type
__p = __p->__next;
}
}
-#endif
+#endif // _LIBCPP_DEBUG
}
template <class _CharT, class _Traits, class _Allocator>
@@ -1586,7 +1586,6 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, value_typ
__init(__n, __c);
}
-
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos, size_type __n,
const allocator_type& __a)
@@ -1612,7 +1611,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _Input
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
-#endif
+#endif // _LIBCPP_NO_EXCEPTIONS
for (; __first != __last; ++__first)
push_back(*__first);
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -1623,7 +1622,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _Input
__alloc().deallocate(__get_long_pointer(), __get_long_cap());
throw;
}
-#endif
+#endif // _LIBCPP_NO_EXCEPTIONS
}
template <class _CharT, class _Traits, class _Allocator>
@@ -2545,7 +2544,7 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __res_arg)
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
- #endif
+ #endif // _LIBCPP_NO_EXCEPTIONS
__new_data = __alloc().allocate(__res_arg+1);
#ifndef _LIBCPP_NO_EXCEPTIONS
}
@@ -2553,10 +2552,10 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __res_arg)
{
return;
}
- #else
+ #else // _LIBCPP_NO_EXCEPTIONS
if (__new_data == 0)
return;
- #endif
+ #endif // _LIBCPP_NO_EXCEPTIONS
}
__now_long = true;
__was_long = __is_long();
@@ -2690,7 +2689,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
#ifdef _LIBCPP_DEBUG
__invalidate_all_iterators();
__str.__invalidate_all_iterators();
-#endif
+#endif // _LIBCPP_DEBUG
}
// find
@@ -3180,7 +3179,7 @@ operator==(const basic_string<wchar_t, char_traits<wchar_t>, _Allocator>& __lhs,
// operator!=
-template<class _CharT, class _Traits, class _Allocator>
+template<class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
bool
operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
@@ -3505,7 +3504,7 @@ struct __is_zero_default_constructible<basic_string<_CharT, _Traits, _Allocator>
typedef basic_string<char16_t> u16string;
typedef basic_string<char32_t> u32string;
-#endif
+#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
int stoi (const string& __str, size_t* __idx = 0, int __base = 10);
long stol (const string& __str, size_t* __idx = 0, int __base = 10);