From 31e86ba6b1eba8dbb256b3a20e2696d5dff43215 Mon Sep 17 00:00:00 2001 From: Yishuo Wang Date: Sun, 16 Jul 2023 19:21:08 +0800 Subject: [PATCH] Update variantvisit.cpp --- latex/code/lib/variantvisit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/latex/code/lib/variantvisit.cpp b/latex/code/lib/variantvisit.cpp index 0f834f7..2932b46 100644 --- a/latex/code/lib/variantvisit.cpp +++ b/latex/code/lib/variantvisit.cpp @@ -11,7 +11,7 @@ struct MyVisitor std::cout << "string: " << s << '\n'; } void operator() (long double d) const { - std::cotu << "double: " << d << '\n'; + std::cout << "double: " << d << '\n'; } }; @@ -23,4 +23,4 @@ int main() std::visit(MyVisitor(), var); // 调用string的operator() var = 42.7; std::visit(MyVisitor(), var); // 调用long double的operator() -} \ No newline at end of file +}