/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2011-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
p.set(&foo);
EXPECT_EQ("Foo", p.apply(Visitor()));
EXPECT_EQ("const Foo", static_cast<const Ptr&>(p).apply(Visitor()));
+ EXPECT_EQ("Foo", apply_visitor(Visitor(), p));
+ EXPECT_EQ("const Foo", apply_visitor(Visitor(), static_cast<const Ptr&>(p)));
+ EXPECT_EQ("Foo", apply_visitor(Visitor(), std::move(p)));
p.clear();
EXPECT_THROW({p.apply(Visitor());}, std::invalid_argument);