Skip to content

Commit 2ffa170

Browse files
committed
In the review of D58642, Louis asked: 'Is there a reason for making this inline? Templates are already inline by default'. I told him that I didn't want to change the one call (ssize) that I was adding, but would come back later and clean them all (data/empty/begin/end/cbegin/cend/rbegin/rend/crbegin/crend/size/ssize) up later. Now it is later. Remove the unnecessary 'inline' modifiers from all these calls.
llvm-svn: 354952
1 parent b67342e commit 2ffa170

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

libcxx/include/iterator

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,15 +1662,15 @@ struct __libcpp_is_trivial_iterator<__wrap_iter<_Iter> >
16621662

16631663

16641664
template <class _Tp, size_t _Np>
1665-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1665+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
16661666
_Tp*
16671667
begin(_Tp (&__array)[_Np])
16681668
{
16691669
return __array;
16701670
}
16711671

16721672
template <class _Tp, size_t _Np>
1673-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1673+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
16741674
_Tp*
16751675
end(_Tp (&__array)[_Np])
16761676
{
@@ -1680,31 +1680,31 @@ end(_Tp (&__array)[_Np])
16801680
#if !defined(_LIBCPP_CXX03_LANG)
16811681

16821682
template <class _Cp>
1683-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1683+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
16841684
auto
16851685
begin(_Cp& __c) -> decltype(__c.begin())
16861686
{
16871687
return __c.begin();
16881688
}
16891689

16901690
template <class _Cp>
1691-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1691+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
16921692
auto
16931693
begin(const _Cp& __c) -> decltype(__c.begin())
16941694
{
16951695
return __c.begin();
16961696
}
16971697

16981698
template <class _Cp>
1699-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1699+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17001700
auto
17011701
end(_Cp& __c) -> decltype(__c.end())
17021702
{
17031703
return __c.end();
17041704
}
17051705

17061706
template <class _Cp>
1707-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1707+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17081708
auto
17091709
end(const _Cp& __c) -> decltype(__c.end())
17101710
{
@@ -1714,84 +1714,84 @@ end(const _Cp& __c) -> decltype(__c.end())
17141714
#if _LIBCPP_STD_VER > 11
17151715

17161716
template <class _Tp, size_t _Np>
1717-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1717+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17181718
reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
17191719
{
17201720
return reverse_iterator<_Tp*>(__array + _Np);
17211721
}
17221722

17231723
template <class _Tp, size_t _Np>
1724-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1724+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17251725
reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
17261726
{
17271727
return reverse_iterator<_Tp*>(__array);
17281728
}
17291729

17301730
template <class _Ep>
1731-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1731+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17321732
reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
17331733
{
17341734
return reverse_iterator<const _Ep*>(__il.end());
17351735
}
17361736

17371737
template <class _Ep>
1738-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1738+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17391739
reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
17401740
{
17411741
return reverse_iterator<const _Ep*>(__il.begin());
17421742
}
17431743

17441744
template <class _Cp>
1745-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1745+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
17461746
auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c))
17471747
{
17481748
return _VSTD::begin(__c);
17491749
}
17501750

17511751
template <class _Cp>
1752-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
1752+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
17531753
auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c))
17541754
{
17551755
return _VSTD::end(__c);
17561756
}
17571757

17581758
template <class _Cp>
1759-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1759+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17601760
auto rbegin(_Cp& __c) -> decltype(__c.rbegin())
17611761
{
17621762
return __c.rbegin();
17631763
}
17641764

17651765
template <class _Cp>
1766-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1766+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17671767
auto rbegin(const _Cp& __c) -> decltype(__c.rbegin())
17681768
{
17691769
return __c.rbegin();
17701770
}
17711771

17721772
template <class _Cp>
1773-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1773+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17741774
auto rend(_Cp& __c) -> decltype(__c.rend())
17751775
{
17761776
return __c.rend();
17771777
}
17781778

17791779
template <class _Cp>
1780-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1780+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17811781
auto rend(const _Cp& __c) -> decltype(__c.rend())
17821782
{
17831783
return __c.rend();
17841784
}
17851785

17861786
template <class _Cp>
1787-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1787+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17881788
auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
17891789
{
17901790
return _VSTD::rbegin(__c);
17911791
}
17921792

17931793
template <class _Cp>
1794-
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
1794+
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
17951795
auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
17961796
{
17971797
return _VSTD::rend(__c);
@@ -1803,31 +1803,31 @@ auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
18031803
#else // defined(_LIBCPP_CXX03_LANG)
18041804

18051805
template <class _Cp>
1806-
inline _LIBCPP_INLINE_VISIBILITY
1806+
_LIBCPP_INLINE_VISIBILITY
18071807
typename _Cp::iterator
18081808
begin(_Cp& __c)
18091809
{
18101810
return __c.begin();
18111811
}
18121812

18131813
template <class _Cp>
1814-
inline _LIBCPP_INLINE_VISIBILITY
1814+
_LIBCPP_INLINE_VISIBILITY
18151815
typename _Cp::const_iterator
18161816
begin(const _Cp& __c)
18171817
{
18181818
return __c.begin();
18191819
}
18201820

18211821
template <class _Cp>
1822-
inline _LIBCPP_INLINE_VISIBILITY
1822+
_LIBCPP_INLINE_VISIBILITY
18231823
typename _Cp::iterator
18241824
end(_Cp& __c)
18251825
{
18261826
return __c.end();
18271827
}
18281828

18291829
template <class _Cp>
1830-
inline _LIBCPP_INLINE_VISIBILITY
1830+
_LIBCPP_INLINE_VISIBILITY
18311831
typename _Cp::const_iterator
18321832
end(const _Cp& __c)
18331833
{
@@ -1853,64 +1853,64 @@ end(const _Cp& __c)
18531853
// #endif
18541854

18551855
template <class _Cont>
1856-
inline _LIBCPP_INLINE_VISIBILITY
1856+
_LIBCPP_INLINE_VISIBILITY
18571857
constexpr auto size(const _Cont& __c)
18581858
_NOEXCEPT_(noexcept(__c.size()))
18591859
-> decltype (__c.size())
18601860
{ return __c.size(); }
18611861

18621862
template <class _Tp, size_t _Sz>
1863-
inline _LIBCPP_INLINE_VISIBILITY
1863+
_LIBCPP_INLINE_VISIBILITY
18641864
constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }
18651865

18661866
#if _LIBCPP_STD_VER > 17
18671867
template <class _Cont>
1868-
inline _LIBCPP_INLINE_VISIBILITY
1868+
_LIBCPP_INLINE_VISIBILITY
18691869
constexpr auto ssize(const _Cont& __c)
18701870
_NOEXCEPT_(noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size())))
18711871
-> common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>
18721872
{ return static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size()); }
18731873

18741874
template <class _Tp, ptrdiff_t _Sz>
1875-
inline _LIBCPP_INLINE_VISIBILITY
1875+
_LIBCPP_INLINE_VISIBILITY
18761876
constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
18771877
#endif
18781878

18791879
template <class _Cont>
1880-
_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY
1880+
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
18811881
constexpr auto empty(const _Cont& __c)
18821882
_NOEXCEPT_(noexcept(__c.empty()))
18831883
-> decltype (__c.empty())
18841884
{ return __c.empty(); }
18851885

18861886
template <class _Tp, size_t _Sz>
1887-
_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY
1887+
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
18881888
constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; }
18891889

18901890
template <class _Ep>
1891-
_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY
1891+
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
18921892
constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }
18931893

18941894
template <class _Cont> constexpr
1895-
inline _LIBCPP_INLINE_VISIBILITY
1895+
_LIBCPP_INLINE_VISIBILITY
18961896
auto data(_Cont& __c)
18971897
_NOEXCEPT_(noexcept(__c.data()))
18981898
-> decltype (__c.data())
18991899
{ return __c.data(); }
19001900

19011901
template <class _Cont> constexpr
1902-
inline _LIBCPP_INLINE_VISIBILITY
1902+
_LIBCPP_INLINE_VISIBILITY
19031903
auto data(const _Cont& __c)
19041904
_NOEXCEPT_(noexcept(__c.data()))
19051905
-> decltype (__c.data())
19061906
{ return __c.data(); }
19071907

19081908
template <class _Tp, size_t _Sz>
1909-
inline _LIBCPP_INLINE_VISIBILITY
1909+
_LIBCPP_INLINE_VISIBILITY
19101910
constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept { return __array; }
19111911

19121912
template <class _Ep>
1913-
inline _LIBCPP_INLINE_VISIBILITY
1913+
_LIBCPP_INLINE_VISIBILITY
19141914
constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept { return __il.begin(); }
19151915
#endif
19161916

0 commit comments

Comments
 (0)