Cleanup: move visibility/linkage attributes to the first declaration.

This change moves visibility attributes from out-of-class method
definitions to in-class declaration. This is needed for a switch to
attribute((internal_linkage)) (see http://reviews.llvm.org/D13925)
which can only appear on the first declaration.

This change does not touch istream/ostream/streambuf. They are
handled separately in http://reviews.llvm.org/D14409.

llvm-svn: 252385
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 906c872db9344ce483282938f83ee5d4a262f3e6
diff --git a/include/valarray b/include/valarray
index bdaa588..ecfd75b 100644
--- a/include/valarray
+++ b/include/valarray
@@ -802,11 +802,14 @@
     // construct/destroy:
     _LIBCPP_INLINE_VISIBILITY
     valarray() : __begin_(0), __end_(0) {}
+    _LIBCPP_INLINE_VISIBILITY
     explicit valarray(size_t __n);
+    _LIBCPP_INLINE_VISIBILITY
     valarray(const value_type& __x, size_t __n);
     valarray(const value_type* __p, size_t __n);
     valarray(const valarray& __v);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     valarray(valarray&& __v) _NOEXCEPT;
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
@@ -816,22 +819,31 @@
     valarray(const gslice_array<value_type>& __ga);
     valarray(const mask_array<value_type>& __ma);
     valarray(const indirect_array<value_type>& __ia);
+    _LIBCPP_INLINE_VISIBILITY
     ~valarray();
 
     // assignment:
     valarray& operator=(const valarray& __v);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(valarray&& __v) _NOEXCEPT;
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(initializer_list<value_type>);
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(const slice_array<value_type>& __sa);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(const gslice_array<value_type>& __ga);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(const mask_array<value_type>& __ma);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator=(const indirect_array<value_type>& __ia);
     template <class _ValExpr>
+        _LIBCPP_INLINE_VISIBILITY
         valarray& operator=(const __val_expr<_ValExpr>& __v);
 
     // element access:
@@ -842,24 +854,38 @@
     value_type&       operator[](size_t __i)       {return __begin_[__i];}
 
     // subset operations:
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__slice_expr<const valarray&> >    operator[](slice __s) const;
+    _LIBCPP_INLINE_VISIBILITY
     slice_array<value_type>                       operator[](slice __s);
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
+    _LIBCPP_INLINE_VISIBILITY
     gslice_array<value_type>   operator[](const gslice& __gs);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
+    _LIBCPP_INLINE_VISIBILITY
     gslice_array<value_type>                      operator[](gslice&& __gs);
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__mask_expr<const valarray&> >     operator[](const valarray<bool>& __vb) const;
+    _LIBCPP_INLINE_VISIBILITY
     mask_array<value_type>                        operator[](const valarray<bool>& __vb);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__mask_expr<const valarray&> >     operator[](valarray<bool>&& __vb) const;
+    _LIBCPP_INLINE_VISIBILITY
     mask_array<value_type>                        operator[](valarray<bool>&& __vb);
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
+    _LIBCPP_INLINE_VISIBILITY
     indirect_array<value_type>                    operator[](const valarray<size_t>& __vs);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
+    _LIBCPP_INLINE_VISIBILITY
     indirect_array<value_type>                    operator[](valarray<size_t>&& __vs);
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
@@ -870,15 +896,25 @@
     valarray<bool> operator!() const;
 
     // computed assignment:
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator*= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator/= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator%= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator+= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator-= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator^= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator&= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator|= (const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator<<=(const value_type& __x);
+    _LIBCPP_INLINE_VISIBILITY
     valarray& operator>>=(const value_type& __x);
 
     template <class _Expr>
@@ -887,6 +923,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator*= (const _Expr& __v);
 
     template <class _Expr>
@@ -895,6 +932,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator/= (const _Expr& __v);
 
     template <class _Expr>
@@ -903,6 +941,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator%= (const _Expr& __v);
 
     template <class _Expr>
@@ -911,6 +950,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator+= (const _Expr& __v);
 
     template <class _Expr>
@@ -919,6 +959,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator-= (const _Expr& __v);
 
     template <class _Expr>
@@ -927,6 +968,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator^= (const _Expr& __v);
 
     template <class _Expr>
@@ -935,6 +977,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator|= (const _Expr& __v);
 
     template <class _Expr>
@@ -943,6 +986,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator&= (const _Expr& __v);
 
     template <class _Expr>
@@ -951,6 +995,7 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator<<= (const _Expr& __v);
 
     template <class _Expr>
@@ -959,16 +1004,21 @@
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator>>= (const _Expr& __v);
 
     // member functions:
+    _LIBCPP_INLINE_VISIBILITY
     void swap(valarray& __v) _NOEXCEPT;
 
     _LIBCPP_INLINE_VISIBILITY
     size_t size() const {return static_cast<size_t>(__end_ - __begin_);}
 
+    _LIBCPP_INLINE_VISIBILITY
     value_type sum() const;
+    _LIBCPP_INLINE_VISIBILITY
     value_type min() const;
+    _LIBCPP_INLINE_VISIBILITY
     value_type max() const;
 
     valarray shift (int __i) const;
@@ -1114,6 +1164,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1122,6 +1173,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1130,6 +1182,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1138,6 +1191,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1146,6 +1200,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1154,6 +1209,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1162,6 +1218,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1170,6 +1227,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1178,6 +1236,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1186,6 +1245,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1194,10 +1254,13 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     const slice_array& operator=(const slice_array& __sa) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
 private:
@@ -1213,7 +1276,7 @@
 };
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 const slice_array<_Tp>&
 slice_array<_Tp>::operator=(const slice_array& __sa) const
 {
@@ -1226,7 +1289,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1241,7 +1304,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1256,7 +1319,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1271,7 +1334,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1286,7 +1349,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1301,7 +1364,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1316,7 +1379,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1331,7 +1394,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1346,7 +1409,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1361,7 +1424,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1376,7 +1439,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1390,7 +1453,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 slice_array<_Tp>::operator=(const value_type& __x) const
 {
@@ -1484,6 +1547,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1492,6 +1556,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1500,6 +1565,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1508,6 +1574,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1516,6 +1583,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1524,6 +1592,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1532,6 +1601,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1540,6 +1610,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1548,6 +1619,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1556,6 +1628,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1564,10 +1637,13 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     const gslice_array& operator=(const gslice_array& __ga) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
 //  gslice_array(const gslice_array&)            = default;
@@ -1576,20 +1652,16 @@
 //  gslice_array& operator=(gslice_array&&)      = default;
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
     gslice_array(const gslice& __gs, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_)),
           __1d_(__gs.__1d_)
         {}
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-    _LIBCPP_INLINE_VISIBILITY
     gslice_array(gslice&& __gs, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_)),
           __1d_(move(__gs.__1d_))
         {}
-
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
     template <class> friend class valarray;
@@ -1597,7 +1669,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1613,7 +1685,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1629,7 +1701,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1645,7 +1717,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1661,7 +1733,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1677,7 +1749,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1693,7 +1765,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1709,7 +1781,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1725,7 +1797,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1741,7 +1813,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1757,7 +1829,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1772,7 +1844,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 const gslice_array<_Tp>&
 gslice_array<_Tp>::operator=(const gslice_array& __ga) const
 {
@@ -1785,7 +1857,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 gslice_array<_Tp>::operator=(const value_type& __x) const
 {
@@ -1813,6 +1885,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1821,6 +1894,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1829,6 +1903,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1837,6 +1912,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1845,6 +1921,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1853,6 +1930,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1861,6 +1939,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1869,6 +1948,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1877,6 +1957,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1885,6 +1966,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1893,10 +1975,13 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     const mask_array& operator=(const mask_array& __ma) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
 //  mask_array(const mask_array&)            = default;
@@ -1921,7 +2006,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1936,7 +2021,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1951,7 +2036,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1966,7 +2051,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1981,7 +2066,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -1996,7 +2081,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2011,7 +2096,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2026,7 +2111,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2041,7 +2126,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2056,7 +2141,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2071,7 +2156,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2085,7 +2170,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 const mask_array<_Tp>&
 mask_array<_Tp>::operator=(const mask_array& __ma) const
 {
@@ -2096,7 +2181,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 mask_array<_Tp>::operator=(const value_type& __x) const
 {
@@ -2158,6 +2243,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2166,6 +2252,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2174,6 +2261,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2182,6 +2270,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2190,6 +2279,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2198,6 +2288,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2206,6 +2297,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2214,6 +2306,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2222,6 +2315,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2230,6 +2324,7 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2238,10 +2333,13 @@
         __is_val_expr<_Expr>::value,
         void
     >::type
+    _LIBCPP_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     const indirect_array& operator=(const indirect_array& __ia) const;
 
+    _LIBCPP_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
 //  indirect_array(const indirect_array&)            = default;
@@ -2271,7 +2369,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2286,7 +2384,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2301,7 +2399,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2316,7 +2414,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2331,7 +2429,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2346,7 +2444,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2361,7 +2459,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2376,7 +2474,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2391,7 +2489,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2406,7 +2504,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2421,7 +2519,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -2435,7 +2533,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 const indirect_array<_Tp>&
 indirect_array<_Tp>::operator=(const indirect_array& __ia) const
 {
@@ -2448,7 +2546,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 indirect_array<_Tp>::operator=(const value_type& __x) const
 {
@@ -2650,7 +2748,7 @@
 // valarray
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>::valarray(size_t __n)
     : __begin_(0),
       __end_(0)
@@ -2659,7 +2757,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>::valarray(const value_type& __x, size_t __n)
     : __begin_(0),
       __end_(0)
@@ -2720,7 +2818,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>::valarray(valarray&& __v) _NOEXCEPT
     : __begin_(__v.__begin_),
       __end_(__v.__end_)
@@ -2874,7 +2972,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>::~valarray()
 {
     resize(0);
@@ -2896,7 +2994,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(valarray&& __v) _NOEXCEPT
 {
@@ -2913,7 +3011,7 @@
 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(initializer_list<value_type> __il)
 {
@@ -2926,7 +3024,7 @@
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const value_type& __x)
 {
@@ -2935,7 +3033,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const slice_array<value_type>& __sa)
 {
@@ -2947,7 +3045,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const gslice_array<value_type>& __ga)
 {
@@ -2961,7 +3059,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const mask_array<value_type>& __ma)
 {
@@ -2975,7 +3073,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const indirect_array<value_type>& __ia)
 {
@@ -2990,7 +3088,7 @@
 
 template <class _Tp>
 template <class _ValExpr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const __val_expr<_ValExpr>& __v)
 {
@@ -3004,7 +3102,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__slice_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](slice __s) const
 {
@@ -3012,7 +3110,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 slice_array<_Tp>
 valarray<_Tp>::operator[](slice __s)
 {
@@ -3020,7 +3118,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__indirect_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](const gslice& __gs) const
 {
@@ -3028,7 +3126,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 gslice_array<_Tp>
 valarray<_Tp>::operator[](const gslice& __gs)
 {
@@ -3038,7 +3136,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__indirect_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](gslice&& __gs) const
 {
@@ -3046,7 +3144,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 gslice_array<_Tp>
 valarray<_Tp>::operator[](gslice&& __gs)
 {
@@ -3056,7 +3154,7 @@
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__mask_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](const valarray<bool>& __vb) const
 {
@@ -3064,7 +3162,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 mask_array<_Tp>
 valarray<_Tp>::operator[](const valarray<bool>& __vb)
 {
@@ -3074,7 +3172,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__mask_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](valarray<bool>&& __vb) const
 {
@@ -3082,7 +3180,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 mask_array<_Tp>
 valarray<_Tp>::operator[](valarray<bool>&& __vb)
 {
@@ -3092,7 +3190,7 @@
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__indirect_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](const valarray<size_t>& __vs) const
 {
@@ -3100,7 +3198,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 indirect_array<_Tp>
 valarray<_Tp>::operator[](const valarray<size_t>& __vs)
 {
@@ -3110,7 +3208,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 __val_expr<__indirect_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](valarray<size_t>&& __vs) const
 {
@@ -3118,7 +3216,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 indirect_array<_Tp>
 valarray<_Tp>::operator[](valarray<size_t>&& __vs)
 {
@@ -3196,7 +3294,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator*=(const value_type& __x)
 {
@@ -3206,7 +3304,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator/=(const value_type& __x)
 {
@@ -3216,7 +3314,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator%=(const value_type& __x)
 {
@@ -3226,7 +3324,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator+=(const value_type& __x)
 {
@@ -3236,7 +3334,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator-=(const value_type& __x)
 {
@@ -3246,7 +3344,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator^=(const value_type& __x)
 {
@@ -3256,7 +3354,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator&=(const value_type& __x)
 {
@@ -3266,7 +3364,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator|=(const value_type& __x)
 {
@@ -3276,7 +3374,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator<<=(const value_type& __x)
 {
@@ -3286,7 +3384,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 valarray<_Tp>&
 valarray<_Tp>::operator>>=(const value_type& __x)
 {
@@ -3297,7 +3395,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3313,7 +3411,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3329,7 +3427,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3345,7 +3443,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3361,7 +3459,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3377,7 +3475,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3393,7 +3491,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3409,7 +3507,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3425,7 +3523,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3441,7 +3539,7 @@
 
 template <class _Tp>
 template <class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3456,7 +3554,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 valarray<_Tp>::swap(valarray& __v) _NOEXCEPT
 {
@@ -3465,7 +3563,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 _Tp
 valarray<_Tp>::sum() const
 {
@@ -3479,7 +3577,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 _Tp
 valarray<_Tp>::min() const
 {
@@ -3489,7 +3587,7 @@
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 _Tp
 valarray<_Tp>::max() const
 {