1 // Copyright 2015 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 #ifndef TRACEIMPL_DERIVED_FROM_TEMPLATED_BASE_H_
6 #define TRACEIMPL_DERIVED_FROM_TEMPLATED_BASE_H_
8 #include "heap/stubs.h"
12 class X
: public GarbageCollected
<X
> {
14 virtual void trace(Visitor
*) {}
18 class TraceImplTemplatedBase
19 : public GarbageCollected
<TraceImplTemplatedBase
<Y
> > {
21 void trace(Visitor
* visitor
) { traceImpl(visitor
); }
23 template <typename VisitorDispatcher
>
24 void traceImpl(VisitorDispatcher visitor
) {
32 class TraceImplDerivedFromTemplatedBase
: public TraceImplTemplatedBase
<0> {
37 #endif // TRACEIMPL_DERIVED_FROM_TEMPLATED_BASE_H_