From 44de8b2d8855c0e09a41d2c5a23c3975cf025aa0 Mon Sep 17 00:00:00 2001 From: Simon Urbanek Date: Sun, 29 Nov 2026 15:46:15 +1300 Subject: [PATCH 1/2] fix ambiguities in const_string_proxy.h failing in clang --- inst/include/Rcpp/vector/const_string_proxy.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/include/Rcpp/vector/const_string_proxy.h b/inst/include/Rcpp/vector/const_string_proxy.h index 10c0b1bcd..bec3867a5 100644 --- a/inst/include/Rcpp/vector/const_string_proxy.h +++ b/inst/include/Rcpp/vector/const_string_proxy.h @@ -97,17 +97,17 @@ namespace internal{ inline bool empty() const { return *begin() == '\0' ; } inline reference operator[]( R_xlen_t n ){ return *( begin() + n ) ; } - bool operator==( const char* other){ + bool operator==( const char* other) const { return strcmp( begin(), other ) == 0 ; } - bool operator!=( const char* other){ + bool operator!=( const char* other) const { return strcmp( begin(), other ) != 0 ; } - bool operator==( const const_string_proxy& other){ + bool operator==( const const_string_proxy& other) const { return strcmp( begin(), other.begin() ) == 0 ; } - bool operator!=( const const_string_proxy& other){ + bool operator!=( const const_string_proxy& other) const { return strcmp( begin(), other.begin() ) != 0 ; } From 90c63df10292e8c3889d17ab8dc2ef01cc18a2c3 Mon Sep 17 00:00:00 2001 From: Simon Urbanek Date: Sun, 29 Nov 2026 19:40:31 +1300 Subject: [PATCH 2/2] update ChangeLog for #1537 --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index d5ed15169..ba7ab6f3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-11-29 Simon Urbanek + + * inst/include/Rcpp/vector/const_string_proxy.h: Declare operator== + and operator!= as const to fix ambiguities failing to compile with + Apple clang (#1537) + 2026-11-27 David Seifert * inst/include/Rcpp/internal/wrap.h: Comment out parameter to avoid