Done !
| Server IP : 194.181.228.65 / Your IP : 216.73.216.135 Web Server : LiteSpeed System : Linux wn13.webd.pl 5.14.0-687.46.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 11 09:03:19 EDT 2026 x86_64 User : prusit ( 133039) PHP Version : 5.6.40 Disable Function : exec, system, shell_exec, passthru, proc_open, proc_close, popen MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/include/boost/property_map/ |
Upload File : |
// Copyright (C) 2009 Trustees of Indiana University
// Authors: Jeremiah Willcock, Andrew Lumsdaine
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/property_map for documentation.
#ifndef BOOST_SHARED_ARRAY_PROPERTY_MAP_HPP
#define BOOST_SHARED_ARRAY_PROPERTY_MAP_HPP
#include <boost/smart_ptr/shared_array.hpp>
#include <boost/property_map/property_map.hpp>
namespace boost {
template <class T, class IndexMap>
class shared_array_property_map
: public boost::put_get_helper<T&, shared_array_property_map<T, IndexMap> >
{
public:
typedef typename property_traits<IndexMap>::key_type key_type;
typedef T value_type;
typedef T& reference;
typedef boost::lvalue_property_map_tag category;
inline shared_array_property_map(): data(), index() {}
explicit inline shared_array_property_map(
size_t n,
const IndexMap& _id = IndexMap())
: data(new T[n]), index(_id) {}
inline T& operator[](key_type v) const {
return data[get(index, v)];
}
private:
boost::shared_array<T> data;
IndexMap index;
};
template <class T, class IndexMap>
shared_array_property_map<T, IndexMap>
make_shared_array_property_map(size_t n, const T&, const IndexMap& index) {
return shared_array_property_map<T, IndexMap>(n, index);
}
} // end namespace boost
#endif // BOOST_SHARED_ARRAY_PROPERTY_MAP_HPP