Skip to content

Commit

Permalink
Update std_visit.cc
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Rebello <me@michaelrebello.com>
  • Loading branch information
rebello95 committed Sep 10, 2020
1 parent 4b62380 commit 1b0744b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/testdata/check_format/std_visit.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include <variant>

namespace Envoy {
struct SomeVisitorFunctor {
template<typename T>
void operator()(const T& i) const {}
template<typename T>
void operator()(const T& i) const {}
};

void foo() {
absl::variant<int, float> foo(1.23);
absl::variant<int, double> x{12};
SomeVisitorFunctor visitor;
std::visit(visitor, foo);
std::visit(visitor, x);
}
} // namespace Envoy

0 comments on commit 1b0744b

Please sign in to comment.