gecko-dev/tools/clang-tidy/test/readability-redundant-smartptr-get.cpp
2018-10-01 12:52:39 +00:00

20 lines
266 B
C++

#define NULL __null
namespace std {
template <typename T>
struct unique_ptr {
T& operator*() const;
T* operator->() const;
T* get() const;
explicit operator bool() const noexcept;
};
}
struct A {
};
void foo() {
A& b2 = *std::unique_ptr<A>().get();
}