]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/parameter/test/literate/namespaces2.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / parameter / test / literate / namespaces2.cpp
index 6b75cc5dccd441d1fa11f1cd809250a8242a677a..c4a5d4f55f0122cf1842f95e61aaf495f2bc0ab8 100644 (file)
@@ -1,21 +1,29 @@
 
 #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>
+
 using namespace lib;
-int x = f(_name = "jill", _index = 3);
-int main() {}
+
+int main()
+{
+    int x = f(_name = "jill", _index = 3);
+    BOOST_TEST_EQ(x, 3);
+    return boost::report_errors();
+}