]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/parameter/test/literate/writing-the-function0.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / parameter / test / literate / writing-the-function0.cpp
index 4288394977aec948d65d264344b2420b8ee60b7d..6a05ea260294051bcbb164a948329c449287f28f 100644 (file)
@@ -5,39 +5,41 @@ BOOST_PARAMETER_NAME(graph)
 BOOST_PARAMETER_NAME(visitor)
 BOOST_PARAMETER_NAME(root_vertex)
 BOOST_PARAMETER_NAME(index_map)
-BOOST_PARAMETER_NAME(color_map)
+BOOST_PARAMETER_NAME(in_out(color_map))
 
 namespace boost {
 
-template <class T = int>
-struct dfs_visitor
-{};
-
-int vertex_index = 0;
+    template <typename T = int>
+    struct dfs_visitor
+    {
+    };
 
+    int vertex_index = 0;
 }
+
 #include <boost/parameter/preprocessor.hpp>
 
-namespace graphs
-{
-  BOOST_PARAMETER_FUNCTION(
-      (void),                // 1. parenthesized return type
-      depth_first_search,    // 2. name of the function template
-
-      tag,                   // 3. namespace of tag types
-
-      (required (graph, *) ) // 4. one required parameter, and
-
-      (optional              //    four optional parameters, with defaults
-        (visitor,           *, boost::dfs_visitor<>())
-        (root_vertex,       *, *vertices(graph).first)
-        (index_map,         *, get(boost::vertex_index,graph))
-        (in_out(color_map), *,
-          default_color_map(num_vertices(graph), index_map) )
-      )
-  )
-  {
-      // ... body of function goes here...
-      // use graph, visitor, index_map, and color_map
-  }
+namespace graphs {
+
+    BOOST_PARAMETER_FUNCTION(
+        (void),                // 1. parenthesized return type
+        depth_first_search,    // 2. name of the function template
+
+        tag,                   // 3. namespace of tag types
+
+        (required (graph, *) ) // 4. one required parameter, and
+
+        (optional              //    four optional parameters, with defaults
+            (visitor,           *, boost::dfs_visitor<>())
+            (root_vertex,       *, *vertices(graph).first)
+            (index_map,         *, get(boost::vertex_index,graph))
+            (in_out(color_map), *,
+                default_color_map(num_vertices(graph), index_map)
+            )
+        )
+    )
+    {
+        // ... body of function goes here...
+        // use graph, visitor, index_map, and color_map
+    }
 }