summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__config
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-08-03 23:54:29 +0000
committerEric Fiselier <eric@efcs.ca>2019-08-03 23:54:29 +0000
commitfcd549a7d8284a8e7c763fee3da2206acd8cdc4f (patch)
tree59861c49742757d9a123ef9322e56c5890852149 /libcxx/include/__config
parent44b16bd4a5b20ce8b4e9ef56836123a2038f3670 (diff)
downloadbcm5719-llvm-fcd549a7d8284a8e7c763fee3da2206acd8cdc4f.tar.gz
bcm5719-llvm-fcd549a7d8284a8e7c763fee3da2206acd8cdc4f.zip
Suppress -Wctad-maybe-unsupported on types w/o deduction guides.
There are a handful of standard library types that are intended to support CTAD but don't need any explicit deduction guides to do so. This patch adds a dummy deduction guide to those types to suppress -Wctad-maybe-unsupported (which gets emitted in user code). llvm-svn: 367770
Diffstat (limited to 'libcxx/include/__config')
-rw-r--r--libcxx/include/__config9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index e49adb4d63a..a8991c37056 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -1429,6 +1429,15 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#define _LIBCPP_UNUSED_VAR(x) ((void)(x))
+#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+#define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(_ClassName) \
+ template <class _Tag = void> \
+ _ClassName(typename _Tag::__allow_ctad) -> _ClassName<void>
+#else
+#define _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(_ClassName) \
+ static_assert(true, "")
+#endif // _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+
#endif // __cplusplus
#endif // _LIBCPP_CONFIG
OpenPOWER on IntegriCloud