1// Copyright 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5template <typename>
6class scoped_refptr {
7 public:
8  void* get() { return 0; }
9};
10
11namespace base {
12
13template <typename Functor, typename... Args>
14void Bind(Functor&&, Args&&...) {}
15
16}  // namespace base
17
18struct Foo {
19  void Bar();
20  static void Baz();
21};
22
23void Test() {
24  using base::Bind;
25  scoped_refptr<int> foo;
26  base::Bind(&Foo::Bar, foo);
27  Bind(&Foo::Bar, foo);
28  base::Bind(&Foo::Bar, (&foo));
29  base::Bind(&Foo::Bar, foo);
30  base::Bind(&Foo::Bar, foo);
31  base::Bind(&Foo::Bar, foo, foo.get());
32  base::Bind(&Foo::Baz, foo.get());
33  base::Bind(&Foo::Bar, foo);
34  base::Bind(&Foo::Bar, (&foo));
35}
36