[Groonga-commit] groonga/groonga [master] Fix namespaces for argument depenedent lookup (ADL).

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 10日 (火) 10:40:39 JST


Susumu Yata	2012-07-10 10:40:39 +0900 (Tue, 10 Jul 2012)

  New Revision: 5ea30d68078f9d7210922b057e21e9a46f31568b
  https://github.com/groonga/groonga/commit/5ea30d68078f9d7210922b057e21e9a46f31568b

  Log:
    Fix namespaces for argument depenedent lookup (ADL).

  Modified files:
    test/unit/core/dat/test-node.cpp
    test/unit/core/dat/test-string.hpp

  Modified: test/unit/core/dat/test-node.cpp (+25 -22)
===================================================================
--- test/unit/core/dat/test-node.cpp    2012-07-10 14:32:51 +0900 (6ddf0b7)
+++ test/unit/core/dat/test-node.cpp    2012-07-10 10:40:39 +0900 (6218df0)
@@ -24,33 +24,36 @@
 
 #include <iostream>
 
-namespace cut
+namespace grn
 {
-  std::ostream &operator<<(std::ostream &stream, const grn::dat::Base &base)
+  namespace dat
   {
-    if (base.is_linker()) {
-      stream << "linker: " << base.key_pos();
-    } else {
-      stream << "non-linker: " << base.offset();
-    }
-    return stream;
-  }
-
-  std::ostream &operator<<(std::ostream &stream, const grn::dat::Check &check)
-  {
-    if (check.is_offset()) {
-      stream << "offset: " << check.except_is_offset() << "; ";
-    } else {
-      stream << "not offset: " << check.except_is_offset() << "; ";
+    std::ostream &operator<<(std::ostream &stream, const grn::dat::Base &base)
+    {
+      if (base.is_linker()) {
+        stream << "linker: " << base.key_pos();
+      } else {
+        stream << "non-linker: " << base.offset();
+      }
+      return stream;
     }
 
-    if (check.is_phantom()) {
-      stream << "phantom: " << check.next() << ", " << check.prev();
-    } else {
-      stream << "non-phantom: " << check.label()
-             << ", " << check.child() << ", " << check.sibling();
+    std::ostream &operator<<(std::ostream &stream, const grn::dat::Check &check)
+    {
+      if (check.is_offset()) {
+        stream << "offset: " << check.except_is_offset() << "; ";
+      } else {
+        stream << "not offset: " << check.except_is_offset() << "; ";
+      }
+
+      if (check.is_phantom()) {
+        stream << "phantom: " << check.next() << ", " << check.prev();
+      } else {
+        stream << "non-phantom: " << check.label()
+               << ", " << check.child() << ", " << check.sibling();
+      }
+      return stream;
     }
-    return stream;
   }
 }
 

  Modified: test/unit/core/dat/test-string.hpp (+4 -2)
===================================================================
--- test/unit/core/dat/test-string.hpp    2012-07-10 14:32:51 +0900 (2323db6)
+++ test/unit/core/dat/test-string.hpp    2012-07-10 10:40:39 +0900 (1322337)
@@ -23,13 +23,15 @@
 
 #include <iostream>
 
-namespace cut {
+namespace grn {
+namespace dat {
 
 inline std::ostream &operator<<(std::ostream &stream,
                                 const grn::dat::String &str) {
   return stream.write(static_cast<const char *>(str.ptr()), str.length());
 }
 
-}  // namespace cut
+}  // namespace dat
+}  // namespace grn
 
 #endif  // GRN_DAT_TEST_STRING_HPP_
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index