|
Revision 20335, 1.3 kB
(checked in by frsyuki, 5 years ago)
|
|
lang/c/mpio: added mp::weak_ptr
|
| Line | |
|---|
| 1 | // |
|---|
| 2 | // mp::memory |
|---|
| 3 | // |
|---|
| 4 | // Copyright (C) 2008 FURUHASHI Sadayuki |
|---|
| 5 | // |
|---|
| 6 | // Licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 7 | // you may not use this file except in compliance with the License. |
|---|
| 8 | // You may obtain a copy of the License at |
|---|
| 9 | // |
|---|
| 10 | // http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 11 | // |
|---|
| 12 | // Unless required by applicable law or agreed to in writing, software |
|---|
| 13 | // distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 15 | // See the License for the specific language governing permissions and |
|---|
| 16 | // limitations under the License. |
|---|
| 17 | // |
|---|
| 18 | |
|---|
| 19 | #ifndef MP_MEMORY_H__ |
|---|
| 20 | #define MP_MEMORY_H__ |
|---|
| 21 | |
|---|
| 22 | #ifdef MP_MEMORY_BOOST |
|---|
| 23 | #include <boost/tr1/memory> |
|---|
| 24 | namespace mp { |
|---|
| 25 | using std::tr1::shared_ptr; |
|---|
| 26 | using std::tr1::wak_ptr; |
|---|
| 27 | //using std::tr2::scoped_ptr; |
|---|
| 28 | } |
|---|
| 29 | #else |
|---|
| 30 | #ifdef MP_MEMORY_BOOST_ORG |
|---|
| 31 | #include <boost/shared_ptr.hpp> |
|---|
| 32 | //#include <boost/scoped_ptr.hpp> |
|---|
| 33 | namespace mp { |
|---|
| 34 | using boost::shared_ptr; |
|---|
| 35 | using boost::weak_ptr; |
|---|
| 36 | //using boost::scoped_ptr; |
|---|
| 37 | } |
|---|
| 38 | #else |
|---|
| 39 | #ifndef MP_MEMORY_STANDARD |
|---|
| 40 | #include <tr1/memory> |
|---|
| 41 | namespace mp { |
|---|
| 42 | using std::tr1::shared_ptr; |
|---|
| 43 | using std::tr1::weak_ptr; |
|---|
| 44 | //using std::tr2::scoped_ptr; |
|---|
| 45 | } |
|---|
| 46 | #else |
|---|
| 47 | #include <memory> |
|---|
| 48 | namespace mp { |
|---|
| 49 | using std::shared_ptr; |
|---|
| 50 | using std::weak_ptr; |
|---|
| 51 | //using std::scoped_ptr; |
|---|
| 52 | } |
|---|
| 53 | #endif |
|---|
| 54 | #endif |
|---|
| 55 | #endif |
|---|
| 56 | |
|---|
| 57 | #endif /* mp/memory.h */ |
|---|
| 58 | |
|---|