sl@0: //======================================================================= sl@0: // Copyright 2002 Indiana University. sl@0: // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: //======================================================================= sl@0: sl@0: /* sl@0: * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. sl@0: */ sl@0: sl@0: #include sl@0: #include sl@0: #ifdef __SYMBIAN32__ sl@0: #include "std_log_result.h" sl@0: #define LOG_FILENAME_LINE __FILE__, __LINE__ sl@0: #endif sl@0: using namespace boost; sl@0: sl@0: struct vertex_info_t { }; sl@0: struct edge_info_t { }; sl@0: namespace boost { sl@0: BOOST_INSTALL_PROPERTY(vertex, info); sl@0: BOOST_INSTALL_PROPERTY(edge, info); sl@0: }; sl@0: sl@0: typedef property vertex_properties; sl@0: typedef property edge_properties; sl@0: sl@0: typedef adjacency_list graph_t; sl@0: sl@0: double& foo_1(graph_t& x) sl@0: { sl@0: property_map::type pmap sl@0: = get(vertex_info_t(), x); sl@0: return pmap[vertex(0, x)]; sl@0: } sl@0: sl@0: const double& foo_2(graph_t const & x) sl@0: { sl@0: property_map::const_type pmap sl@0: = get(vertex_info_t(), x); sl@0: return pmap[vertex(0, x)]; sl@0: } sl@0: sl@0: double& bar_1(graph_t& x) sl@0: { sl@0: property_map::type pmap sl@0: = get(edge_info_t(), x); sl@0: return pmap[edge(vertex(0, x), vertex(1, x), x).first]; sl@0: } sl@0: sl@0: const double& bar_2(graph_t const & x) sl@0: { sl@0: property_map::const_type pmap sl@0: = get(edge_info_t(), x); sl@0: return pmap[edge(vertex(0, x), vertex(1, x), x).first]; sl@0: } sl@0: sl@0: int sl@0: main() sl@0: { sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: std_log(LOG_FILENAME_LINE,"[End Test Case ]"); sl@0: sl@0: testResultXml("lvalue_pmap"); sl@0: close_log_file(); sl@0: #endif sl@0: return 0; sl@0: }