[libcxx] Fix the type attribute for a couple templates
Use `_LIBCPP_TEMPLATE_VIS` instead of `_LIBCPP_TYPE_VIS` for a template
class.
This fixes the nodiscard_extensions.pass.cpp and a couple
func.search.default test cases when built in MSVC/DLL configurations.
Differential Revision: https://reviews.llvm.org/D99932
GitOrigin-RevId: 948dd664c3ed30dd853df03cb931436f280bad4a
diff --git a/include/experimental/functional b/include/experimental/functional
index c7dda22..d8f80ee 100644
--- a/include/experimental/functional
+++ b/include/experimental/functional
@@ -109,7 +109,7 @@
#if _LIBCPP_STD_VER > 11
// default searcher
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS default_searcher {
+class _LIBCPP_TEMPLATE_VIS default_searcher {
public:
_LIBCPP_INLINE_VISIBILITY
default_searcher(_ForwardIterator __f, _ForwardIterator __l,
@@ -207,7 +207,7 @@
template <class _RandomAccessIterator1,
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS boyer_moore_searcher {
+class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
private:
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
@@ -358,7 +358,7 @@
template <class _RandomAccessIterator1,
class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS boyer_moore_horspool_searcher {
+class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
private:
typedef typename std::iterator_traits<_RandomAccessIterator1>::difference_type difference_type;
typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type value_type;
diff --git a/include/functional b/include/functional
index bbc2301..47449b7 100644
--- a/include/functional
+++ b/include/functional
@@ -3176,7 +3176,7 @@
// default searcher
template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TYPE_VIS default_searcher {
+class _LIBCPP_TEMPLATE_VIS default_searcher {
public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
default_searcher(_ForwardIterator __f, _ForwardIterator __l,
diff --git a/include/utility b/include/utility
index 181919c..e81fcbe 100644
--- a/include/utility
+++ b/include/utility
@@ -941,7 +941,7 @@
_LIBCPP_INLINE_VAR constexpr in_place_type_t<_Tp> in_place_type{};
template <size_t _Idx>
-struct _LIBCPP_TYPE_VIS in_place_index_t {
+struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
explicit in_place_index_t() = default;
};
template <size_t _Idx>
diff --git a/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp b/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
index db8eb33..cfb7054 100644
--- a/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
+++ b/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
@@ -18,8 +18,6 @@
// UNSUPPORTED: apple-clang-9
// UNSUPPORTED: gcc-5
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// All entities to which libc++ applies [[nodiscard]] as an extension should
// be tested here and in nodiscard_extensions.fail.cpp. They should also
// be listed in `UsingLibcxx.rst` in the documentation for the extension.
diff --git a/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp b/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
index 079dfaa..9c51b3a 100644
--- a/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
+++ b/test/std/utilities/function.objects/func.search/func.search.default/default.pass.cpp
@@ -8,8 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// <functional>
// default searcher
diff --git a/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp b/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp
index c24e792..8ad0fe3 100644
--- a/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp
+++ b/test/std/utilities/function.objects/func.search/func.search.default/default.pred.pass.cpp
@@ -10,8 +10,6 @@
// UNSUPPORTED: c++03, c++11, c++14
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// default searcher
// template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
// class default_searcher {