Add test for FP fixed by e8c3a80 (#4768)

This commit is contained in:
chrchr-github 2023-02-07 22:09:55 +01:00 committed by GitHub
parent c3225781f3
commit 847d7583e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -2028,6 +2028,16 @@ private:
" if (p != nullptr) {}\n"
"}\n");
ASSERT_EQUALS("", errout.str());
check("template<typename S, typename T>\n"
"void f(const std::vector<S>& v) {\n"
" T a;\n"
" for (typename std::vector<S>::iterator it = v.begin(); it != v.end(); ++it) {\n"
" const T& b = static_cast<const T&>(it->find(1));\n"
" a = b;\n"
" }\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void testglobalnamespace() {