================
@@ -1,44 +1,40 @@
#ifndef
LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_OPTIONAL_H_
#define
LLVM_CLANG_TOOLS_EXTRA_TEST_CLANG_TIDY_CHECKERS_INPUTS_BDE_TYPES_OPTIONAL_H_
-/// Mock of `bsl::optional`.
+#include "../../std/types/optional.h"
+
namespace bsl {
+ class string {};
+}
-// clang-format off
-template <typename T> struct remove_reference { using type = T; };
-template <typename T> struct remove_reference<T&> { using type = T; };
-template <typename T> struct remove_reference<T&&> { using type = T; };
-// clang-format on
+/// Mock of `BloombergLP::bslstl::Optional_Base`
+namespace BloombergLP::bslstl {
-template <typename T>
-using remove_reference_t = typename remove_reference<T>::type;
+template <class T>
+constexpr bool isAllocatorAware() {
+ return false;
+}
-template <typename T>
-constexpr T &&forward(remove_reference_t<T> &t) noexcept;
+template <>
+constexpr bool isAllocatorAware<bsl::string>() {
+ return true;
+}
-template <typename T>
-constexpr T &&forward(remove_reference_t<T> &&t) noexcept;
+// Note: real `Optional_Base` uses `BloombergLP::bslma::UsesBslmaAllocator`
+// to check if type is alocator-aware.
----------------
LMBernardo wrote:
Typo - "alocator"
https://github.com/llvm/llvm-project/pull/168863
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits