std.cfg: Add support for std::fill_n() (#2273)

Reference: https://en.cppreference.com/w/cpp/algorithm/fill_n
This commit is contained in:
Sebastian 2019-10-18 12:24:57 +02:00 committed by GitHub
parent 6e1c7e48b6
commit 8eea046e5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -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 ); -->

View File

@ -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