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.get());
27  Bind(&Foo::Bar, foo.get());
28  base::Bind(&Foo::Bar, (&foo)->get());
29  base::Bind(&Foo::Bar, foo.get(
30       ));
31  base::Bind(&Foo::Bar, foo
32       .get());
33  base::Bind(&Foo::Bar, foo.get(), foo.get());
34  base::Bind(&Foo::Baz, foo.get());
35  base::Bind(&Foo::Bar, foo.scoped_refptr<int>::get());
36  base::Bind(&Foo::Bar, (&foo)->scoped_refptr<int>::get());
37}
38