• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

shared_ptr.h

Go to the documentation of this file.
00001 /**
00002   Licensed to the Apache Software Foundation (ASF) under one
00003   or more contributor license agreements.  See the NOTICE file
00004   distributed with this work for additional information
00005   regarding copyright ownership.  The ASF licenses this file
00006   to you under the Apache License, Version 2.0 (the
00007   "License"); you may not use this file except in compliance
00008   with the License.  You may obtain a copy of the License at
00009 
00010       http://www.apache.org/licenses/LICENSE-2.0
00011 
00012   Unless required by applicable law or agreed to in writing, software
00013   distributed under the License is distributed on an "AS IS" BASIS,
00014   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015   See the License for the specific language governing permissions and
00016   limitations under the License.
00017  */
00018 /**
00019  * @file shared_ptr.h
00020  *
00021  * Shared pointer declaration.
00022  */
00023 
00024 #pragma once
00025 #ifndef ASTCPPAPI_SHARED_PTR_H_
00026 #define ASTCPPAPI_SHARED_PTR_H_
00027 
00028 #include "ink_autoconf.h"
00029 
00030 #if HAVE_STD_SHARED_PTR
00031 #  include <memory>
00032 #else
00033 #  include <tr1/memory>
00034 #endif
00035 
00036 namespace atscppapi {
00037 
00038 /**
00039  * Force the use of std::tr1::shared_ptr
00040  * \todo Consider adding a simple macro to check if c++0x/11 is enabled
00041  * and if so change it to std::shared_ptr and #include <memory>s
00042  */
00043 #if HAVE_STD_SHARED_PTR
00044   using std::shared_ptr;
00045 #else
00046   using std::tr1::shared_ptr;
00047 #endif
00048 
00049 } /* atscppapi */
00050 
00051 #endif /* SHARED_PTR_H_ */

Generated by  doxygen 1.7.1