[PATCH] D31725: [libc++] Add _LIBCPP_DISABLE_EXTERN_TEMPLATE config option

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 13 13:24:52 PDT 2017


smeenai updated this revision to Diff 95189.
smeenai added a comment.

Add documentation


https://reviews.llvm.org/D31725

Files:
  docs/UsingLibcxx.rst
  include/__config


Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -856,6 +856,11 @@
 # endif
 #endif
 
+#ifdef _LIBCPP_DISABLE_EXTERN_TEMPLATE
+#define _LIBCPP_EXTERN_TEMPLATE(...)
+#define _LIBCPP_EXTERN_TEMPLATE2(...)
+#endif
+
 #ifndef _LIBCPP_EXTERN_TEMPLATE
 #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
 #endif
Index: docs/UsingLibcxx.rst
===================================================================
--- docs/UsingLibcxx.rst
+++ docs/UsingLibcxx.rst
@@ -146,6 +146,11 @@
   build of libc++ which does not export any symbols, which can be useful when
   building statically for inclusion into another library.
 
+**_LIBCPP_DISABLE_EXTERN_TEMPLATE**:
+  This macro is used to disable extern template declarations in the libc++
+  headers. The intended use case is for clients who wish to use the libc++
+  headers without taking a dependency on the libc++ library itself.
+
 **_LIBCPP_ENABLE_TUPLE_IMPLICIT_REDUCED_ARITY_EXTENSION**:
   This macro is used to re-enable an extension in `std::tuple` which allowed
   it to be implicitly constructed from fewer initializers than contained


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31725.95189.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170413/1cbc2ee3/attachment.bin>


More information about the cfe-commits mailing list