SharedPtr.h
Go to the documentation of this file.
00001 #ifndef BASELIB_BINDING_SHAREDPTR_H
00002 #define BASELIB_BINDING_SHAREDPTR_H
00003 
00023 #if defined(USE_BOOST) and defined (USE_C11)
00024     "ERROR: Inconsistent use of boost and C++11 at the same time"
00025 #endif
00026 
00027 #if !defined(USE_BOOST) and !defined (USE_C11)
00028     "ERROR: You need to have defined either USE_BOOST or USE_C11, have you included the definitions for this package in your build file (eg cmake)?"
00029 #endif
00030 
00031 #ifdef USE_BOOST
00032 
00033 #include <boost/shared_ptr.hpp>
00034 
00035 #else  // use C++11 std
00036 
00037 #include <memory>
00038 
00039 #endif
00040 
00041 
00042 
00043 namespace baselib_binding
00044 {
00045 
00046 #ifdef USE_BOOST
00047 
00048 /*template <class T>
00049 class shared_ptr: public boost::shared_ptr<T>
00050 { };*/
00051 
00052 // make typedefs of this as follows:
00053 // typedef baselib_binding::shared_ptr<CLASS>::type CLASSPtr;
00054 template <class T>
00055 struct shared_ptr
00056 {
00057     typedef boost::shared_ptr<T> type;
00058 };
00059 
00060 #define baselib_binding_ns boost
00061 
00062 #else  // use C++11 std
00063 
00064 /*template <class T>
00065 class shared_ptr: public std::shared_ptr<T>
00066 { };*/
00067 
00068 // make typedefs of this as follows:
00069 // typedef baselib_binding::shared_ptr<CLASS>::type CLASSPtr;
00070 template <class T>
00071 struct shared_ptr
00072 {
00073     typedef std::shared_ptr<T> type;
00074 };
00075 
00076 
00077 #define baselib_binding_ns std
00078 
00079 #endif
00080 
00081 }  //namespace
00082 
00083 #endif  // BASELIB_BINDING_SHAREDPTR_H


baselib_binding
Author(s): Jennifer Buehler
autogenerated on Sat Mar 2 2019 03:21:38