fix -Wvexing-parse
authorIgor Sugak <sugak@fb.com>
Mon, 2 Oct 2017 20:42:09 +0000 (13:42 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 2 Oct 2017 20:57:57 +0000 (13:57 -0700)
Summary:
```lang=cpp
folly/test/stl_tests/StlVectorTest.cpp:1975:11: error: parentheses were disambiguated as redundant parentheses around declaration of variable named 'm' [-Werror,-Wvexing-parse]
    Vector(m);
          ^~~
folly/test/stl_tests/StlVectorTest.cpp:1975:11: note: add a variable name to declare a 'Vector' initialized with 'm'
    Vector(m);
          ^
           varname
folly/test/stl_tests/StlVectorTest.cpp:1975:5: note: add enclosing parentheses to perform a function-style cast
    Vector(m);
    ^
    (        )
folly/test/stl_tests/StlVectorTest.cpp:1975:11: note: remove parentheses to silence this warning
    Vector(m);
          ^ ~

1 error generated.
```

Reviewed By: Gownta

Differential Revision: D5955613

fbshipit-source-id: 3015570ce111603b3561914d07b55365a221c686

folly/test/stl_tests/StlVectorTest.cpp

index b80b8df..b107cd9 100644 (file)
@@ -1972,7 +1972,7 @@ STL_TEST("23.2.1 Table 99.4", customAllocator, is_destructible, m) {
   ASSERT_TRUE(u.get_allocator() == m);
 
   if (false) {
-    Vector(m);
+    Vector t(m);
   }
 }