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