]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/parameter/test/literate/namespaces0.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / parameter / test / literate / namespaces0.cpp
index 402633fbe3cccf3394a420dcfcd9a1c71354e9bf..a0bd827caadfe19e93296a01eb7f15b9093d71c8 100644 (file)
@@ -1,20 +1,27 @@
 
 #include <boost/parameter.hpp>
 #include <iostream>
-namespace lib
-{
-  BOOST_PARAMETER_NAME(name)
-  BOOST_PARAMETER_NAME(index)
 
-  BOOST_PARAMETER_FUNCTION(
-    (int), f, tag,
-    (optional (name,*,"bob")(index,(int),1))
-  )
-  {
-      std::cout << name << ":" << index << std::endl;
-      return index;
-  }
+namespace lib {
+
+    BOOST_PARAMETER_NAME(name)
+    BOOST_PARAMETER_NAME(index)
+
+    BOOST_PARAMETER_FUNCTION(
+        (int), f, tag, (optional (name,*,"bob")(index,(int),1))
+    )
+    {
+        std::cout << name << ":" << index << std::endl;
+        return index;
+    }
+}
+
+#include <boost/core/lightweight_test.hpp>
+
+int main()
+{
+    int x = lib::f(lib::_name = "jill", lib::_index = 1);
+    BOOST_TEST_EQ(x, 1);
+    return boost::report_errors();
 }
-int x = lib::f(lib::_name = "jill", lib::_index = 1);
-int main() {}