[PATCH] D22782: Added 'inline' attribute to __init to inline the basic_string's constructor
Laxman Sole via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 13:59:41 PDT 2016
laxmansole updated this revision to Diff 67597.
laxmansole added a comment.
Added inline attribute to the forward/input iterator __init's.
Thanks @EricWF for suggestion.
https://reviews.llvm.org/D22782
Files:
libcxx/include/string
Index: libcxx/include/string
===================================================================
--- libcxx/include/string
+++ libcxx/include/string
@@ -2008,6 +2008,7 @@
}
template <class _CharT, class _Traits, class _Allocator>
+inline _LIBCPP_INLINE_VISIBILITY
void
basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz, size_type __reserve)
{
@@ -2032,6 +2033,7 @@
}
template <class _CharT, class _Traits, class _Allocator>
+inline _LIBCPP_INLINE_VISIBILITY
void
basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz)
{
@@ -2169,6 +2171,7 @@
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _CharT, class _Traits, class _Allocator>
+inline _LIBCPP_INLINE_VISIBILITY
void
basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
{
@@ -2244,6 +2247,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _InputIterator>
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_exactly_input_iterator<_InputIterator>::value,
@@ -2271,6 +2275,7 @@
template <class _CharT, class _Traits, class _Allocator>
template <class _ForwardIterator>
+inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_forward_iterator<_ForwardIterator>::value,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22782.67597.patch
Type: text/x-patch
Size: 1314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160810/5ef59235/attachment.bin>
More information about the cfe-commits
mailing list