Skip to content

Commit c046247

Browse files
committed
Fix StringRef build with newer libc++
1 parent 67a8e24 commit c046247

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

include/llvm/ADT/StringRef.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ namespace llvm {
573573
// HLSL Change Starts
574574
// StringRef provides an operator string; that trips up the std::pair noexcept specification,
575575
// which (a) enables the moves constructor (because conversion is allowed), but (b)
576-
// misclassifies the the construction as nothrow.
576+
// misclassifies the the construction as nothrow. Newer libc++ releases reject user
577+
// specializations of this trait outright, and also compute the trait correctly without help.
578+
#if !defined(_LIBCPP_VERSION)
577579
namespace std {
578580
template<>
579581
struct is_nothrow_constructible <std::string, llvm::StringRef>
@@ -588,6 +590,7 @@ namespace std {
588590
: std::false_type {
589591
};
590592
}
593+
#endif
591594
// HLSL Change Ends
592595

593596
#endif

0 commit comments

Comments
 (0)