Go to the source code of this file.
|
template<typename VIEW , typename T > |
constexpr void | bsl::details::fill_impl (VIEW &vw, T const &value) noexcept(//-- is_nothrow_copy_assignable< T >::value) |
| Provides the internal implementation of the fill function. Specifically, this is the non-optimized version. More...
|
|
template<typename VIEW , typename T > |
constexpr enable_if_t< is_copy_assignable< T >::value > | bsl::fill (VIEW &vw, T const &value) noexcept(//-- is_nothrow_copy_assignable< T >::value) |
| Sets all elements of a view to "value". T must be copy assignable. More...
|
|
template<typename ITER , typename T > |
constexpr enable_if_t< is_copy_assignable< T >::value > | bsl::fill (ITER first, ITER last, T const &value) noexcept(//-- is_nothrow_copy_assignable< T >::value) |
| Sets all elements of a view to "value". T must be copy assignable. More...
|
|
- Copyright
- Copyright (C) 2020 Assured Information Security, Inc.
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
◆ fill_impl()
template<typename VIEW , typename T >
constexpr void bsl::details::fill_impl |
( |
VIEW & |
vw, |
|
|
T const & |
value |
|
) |
| |
|
noexcept |
Provides the internal implementation of the fill function. Specifically, this is the non-optimized version.
- Template Parameters
-
VIEW | the type of view to fill |
T | the type to fill the view with |
- Parameters
-
vw | the view to fill |
value | what to fill the view with |
◆ fill() [1/2]
template<typename VIEW , typename T >
constexpr enable_if_t<is_copy_assignable<T>::value> bsl::fill |
( |
VIEW & |
vw, |
|
|
T const & |
value |
|
) |
| |
|
noexcept |
Sets all elements of a view to "value". T must be copy assignable.
namespace bsl
{
inline void
example_fill_overview() noexcept
{
sum += e;
});
if (size == sum) {
}
}
}
- Template Parameters
-
T | the type that defines the values being filled |
- Parameters
-
vw | the view to fill |
value | the value to set the view's elements to |
- Returns
- return's void
- Exceptions
-
throws | if the copy assignment of T throws |
◆ fill() [2/2]
template<typename ITER , typename T >
constexpr enable_if_t<is_copy_assignable<T>::value> bsl::fill |
( |
ITER |
first, |
|
|
ITER |
last, |
|
|
T const & |
value |
|
) |
| |
|
noexcept |
Sets all elements of a view to "value". T must be copy assignable.
namespace bsl
{
inline void
example_fill_overview() noexcept
{
sum += e;
});
if (size == sum) {
}
}
}
- Template Parameters
-
T | the type that defines the values being filled |
- Parameters
-
first | the position to start the loop |
last | the position to end the loop |
value | the value to set the view's elements to |
- Returns
- return's void
- Exceptions
-
throws | if the copy assignment of T throws |