Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: base/export_template_type.h

Issue 12328142: Mark types used in template instantiatious explicitly as visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | cc/occlusion_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
Mark Mentovai 2013/02/28 15:39:22 2013
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_EXPORT_TEMPLATE_TYPE_H_
6 #define EXPORT_TEMPLATE_TYPE_H_
Mark Mentovai 2013/02/28 15:39:22 This is not the same name that you check for on th
7
8 // Class forward declarations usually don't need to be decorated with EXPORT.
9 // However, clang looks at the visibility of forward declarations for explicit
10 // template instantiations and hides the instantiated symbols if any of the
11 // types isn't visible, so class declarations used in explicit macro
12 // instantiations do need EXPORT.
13 // But gcc warns "type attributes ignored after type is already defined" if
14 // it sees an EXPORT on a class declaration after seeing the class itself (which
15 // can happen depending on include order), so define a macro for this purpose.
16 // To be used like:
17 //
18 // EXPORT_TEMPLATE_TYPE(class, UI_EXPORT, Insets);
19 // extern template class MyTemplate<Insets>;
20
21 #if defined(__clang__)
22 #define EXPORT_TEMPLATE_TYPE(kw, export_macro, name) kw export_macro name
23 #else
24 #define EXPORT_TEMPLATE_TYPE(kw, export_macro, name) kw name
25 #endif
26
27 #endif // EXPORT_TEMPLATE_TYPE_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | cc/occlusion_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698