Kudu C++ client API
shared_ptr.h File Reference

Smart pointer typedefs for externally-faced code. More...

#include <string>
#include <tr1/memory>
Include dependency graph for shared_ptr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Smart pointer typedefs for externally-faced code.

Kudu uses c++11 features internally, but provides a client interface which does not require c++11. We use std::tr1::shared_ptr in our public interface to hold shared instances of KuduClient, KuduSession, and KuduTable.

However, if building with libc++ (e.g. if building on macOS), the TR1 APIs are not implemented. As a workaround, we use std::shared_ptr with libc++.

In order to allow applications to compile against Kudu with libstdc++ as well as with libc++, macros are provided that will resolve to the correct namespace in either case. Clients are encouraged to use these macros in order to ensure that applications compile universally.