@@ -37,27 +37,26 @@ struct n1_t
3737 {
3838 num = 23063
3939 };
40- typedef vertex_property_tag kind;
40+ using kind = vertex_property_tag ;
4141};
4242struct n2_t
4343{
4444 enum
4545 {
4646 num = 23062
4747 };
48- typedef vertex_property_tag kind;
48+ using kind = vertex_property_tag ;
4949};
5050struct n3_t
5151{
5252 enum
5353 {
5454 num = 23061
5555 };
56- typedef vertex_property_tag kind;
56+ using kind = vertex_property_tag ;
5757};
58- typedef property< n1_t , int ,
59- property< n2_t , double , property< n3_t , MyStruct > > >
60- VertexProperty;
58+ using VertexProperty = property< n1_t , int ,
59+ property< n2_t , double , property< n3_t , MyStruct > > >;
6160
6261// ====== edge properties
6362struct e1_t
@@ -66,18 +65,17 @@ struct e1_t
6665 {
6766 num = 23064
6867 };
69- typedef edge_property_tag kind;
68+ using kind = edge_property_tag ;
7069};
71- typedef property< e1_t , double > EdgeProperty ;
70+ using EdgeProperty = property< e1_t , double >;
7271
7372// ===== graph types
7473
75- typedef adjacency_list< vecS, listS, directedS, no_property, no_property >
76- Graph1 ;
74+ using Graph1
75+ = adjacency_list< vecS, listS, directedS, no_property, no_property > ;
7776
78- typedef adjacency_list< setS, setS, bidirectionalS, VertexProperty,
79- EdgeProperty >
80- Graph2;
77+ using Graph2 = adjacency_list< setS, setS, bidirectionalS, VertexProperty,
78+ EdgeProperty >;
8179
8280int main ()
8381{
@@ -103,7 +101,7 @@ int main()
103101 // read Graph2, incomplete data in a different order. Write it diffently.
104102 Graph2 g31;
105103 std::ifstream readFile31 (" data3.txt" );
106- typedef property< n3_t , MyStruct, property< n1_t , int > > readNodeProp ;
104+ using readNodeProp = property< n3_t , MyStruct, property< n1_t , int > >;
107105 readFile31 >> read (g31, readNodeProp (), EdgeProperty ());
108106 std::cout << " graph g31 from file data3.txt:\n "
109107 << write (g31, property< n3_t , MyStruct >(), EdgeProperty ())
0 commit comments