1 // Copyright (c) 2013 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.
5 #include "weak_ptr_factory.h"
6 namespace should_succeed
{
9 base::WeakPtrFactory
<OnlyMember
> factory_
;
15 base::WeakPtrFactory
<FactoryLast
> factory_
;
18 class FactoryRefersToOtherType
{
20 base::WeakPtrFactory
<bool> bool_ptr_factory_
;
23 class FirstFactoryRefersToOtherType
{
25 base::WeakPtrFactory
<bool> bool_ptr_factory_
;
27 base::WeakPtrFactory
<FirstFactoryRefersToOtherType
> factory_
;
30 } // namespace should_succeed
32 namespace should_fail
{
35 base::WeakPtrFactory
<FactoryFirst
> factory_
;
41 base::WeakPtrFactory
<FactoryMiddle
> factory_
;
45 } // namespace should_fail