toctave

t(iny)octave
git clone https://0xff.ir/g/toctave.git
Log | Files | Refs | README

memory.hpp (1268B)


      1 /*
      2     Copyright 2017 Adobe
      3     Distributed under the Boost Software License, Version 1.0.
      4     (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
      5 */
      6 
      7 /**************************************************************************************************/
      8 
      9 #ifndef STLAB_MEMORY_HPP
     10 #define STLAB_MEMORY_HPP
     11 
     12 /**************************************************************************************************/
     13 
     14 #include <memory>
     15 
     16 /**************************************************************************************************/
     17 
     18 namespace stlab {
     19 
     20 /**************************************************************************************************/
     21 
     22 inline namespace v1 {
     23 /**************************************************************************************************/
     24 
     25 template <typename T>
     26 auto make_weak_ptr(const std::shared_ptr<T>& x) {
     27     return std::weak_ptr<T>(x);
     28 }
     29 
     30 /**************************************************************************************************/
     31 
     32 } // namespace v1
     33 
     34 /**************************************************************************************************/
     35 
     36 } // namespace stlab
     37 
     38 /**************************************************************************************************/
     39 
     40 #endif