Browse Source

[master] don't pass temporary object as a const& parameter.

on macmini the compiler seems to apply the copy constructor and complain
about it.  that rather seems to be a compiler problem, but this small change
works around it.

committing it at my discretion.
JINMEI Tatuya 13 years ago
parent
commit
cd6a1513bb
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/lib/asiolink/tests/io_endpoint_unittest.cc

+ 4 - 1
src/lib/asiolink/tests/io_endpoint_unittest.cc

@@ -286,6 +286,9 @@ TEST(IOEndpointTest, LeftShiftOperator) {
 
     // Uncommon address family.  The actual behavior doesn't matter much
     // in practice, but we check such input doesn't make it crash.
-    checkEndpointText("2001:db8::bad:add:42", TestIOEndpoint());
+    // We explicitly instantiate the test EP because otherwise some compilers
+    // would be confused and complain.
+    TestIOEndpoint test_ep;
+    checkEndpointText("2001:db8::bad:add:42", test_ep);
 }
 }