fix clang warnings in folly::Gen
authorLouis Brandy <ldbrandy@fb.com>
Mon, 25 Mar 2013 17:16:15 +0000 (10:16 -0700)
committerOwen Yamauchi <oyamauchi@fb.com>
Wed, 27 Mar 2013 21:42:06 +0000 (14:42 -0700)
Summary: Two clang warnings. It wants user defined consturctor for static initialization, and it wants fwd-declare to agree with full decleration in regards to struct v class.

Test Plan:
`fbconfig --clang --platform=gcc-4.7.1-glibc-2.14.1 folly/test/`

And make sure it doesn't break normal build.

Reviewed By: tulloch@fb.com

FB internal diff: D749857

folly/experimental/Gen-inl.h
folly/experimental/Gen.h

index b0e989c1fad5bc22c30fe00c7af1326c261a9f02..dd7425006a7838d16582de6b8ee882cfe6c8455c 100644 (file)
@@ -1214,6 +1214,8 @@ class Count : public Operator<Count> {
  */
 class Sum : public Operator<Sum> {
  public:
+  Sum() : Operator<Sum>() {}
+
   template<class Source,
            class Value,
            class StorageType = typename std::decay<Value>::type>
index 513428dca8fef44ff635a7ae7a916c85f54a32fd..da64fde93139acc0820f892ce45f781e2dd18821 100644 (file)
@@ -250,7 +250,7 @@ template<class Collection>
 class Append;
 
 template<class Value>
-class GeneratorBuilder;
+struct GeneratorBuilder;
 
 template<class Needle>
 class Contains;