]> git.saurik.com Git - apple/xnu.git/blob - tests/intrusive_shared_ptr_src/abi.callee.raw.cpp
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tests / intrusive_shared_ptr_src / abi.callee.raw.cpp
1 //
2 // Declare a function as returning a shared pointer (in the header), but
3 // implement it by returning a raw pointer. This represents a TU that would
4 // not have been translated to shared pointers yet.
5 //
6 // In this TU, SharedPtr<T> is just T* since USE_SHARED_PTR is not defined.
7 //
8
9 #include "abi_helper.h"
10
11 SharedPtr<T>
12 return_raw_as_shared(T* ptr)
13 {
14 return ptr;
15 }