std.cfg: Add support for std::fill_n() (#2273)
Reference: https://en.cppreference.com/w/cpp/algorithm/fill_n
This commit is contained in:
parent
6e1c7e48b6
commit
8eea046e5b
11
cfg/std.cfg
11
cfg/std.cfg
|
@ -7206,6 +7206,17 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- template< class OutputIt, class Size, class T > void std::fill_n( OutputIt first, Size count, const T& value ); // until C++11 -->
|
||||
<!-- template< class OutputIt, class Size, class T > OutputIt std::fill_n( OutputIt first, Size count, const T& value ); // since C++11, until C++20 -->
|
||||
<!-- template< class OutputIt, class Size, class T > constexpr OutputIt std::fill_n( OutputIt first, Size count, const T& value ); // since C++20 -->
|
||||
<!-- template< class ExecutionPolicy, class ForwardIt, class Size, class T > ForwardIt std::fill_n( ExecutionPolicy&& policy, ForwardIt first, Size count, const T& value ); // since C++17 -->
|
||||
<function name="std::fill_n">
|
||||
<noreturn>false</noreturn>
|
||||
<arg nr="1"/>
|
||||
<arg nr="2"/>
|
||||
<arg nr="3" direction="in"/>
|
||||
<arg nr="4" direction="in" default=""/>
|
||||
</function>
|
||||
<!-- @todo: iterator iterator erase (const_iterator position); -->
|
||||
<!-- iterator std::vector::erase( iterator first, iterator last ); -->
|
||||
<!-- iterator std::map::erase( iterator first, iterator last ); -->
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
#include <cstdarg>
|
||||
#include <functional>
|
||||
|
||||
void valid_code()
|
||||
{
|
||||
std::vector<int> vecInt{0, 1, 2};
|
||||
std::fill_n(vecInt.begin(), 2, 0);
|
||||
}
|
||||
|
||||
void returnValue_std_isgreater(void)
|
||||
{
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
|
|
Loading…
Reference in New Issue