cmake: mark the compression tests as slow
[folly.git] / folly / gen / String-inl.h
index 64e86f9866a4f455499273bb17d01ec672b1deec..5c5800ad38d25687461d871e3a56db054cf27db7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
 #endif
 
 #include <folly/Conv.h>
+#include <folly/Portability.h>
 #include <folly/String.h>
 
 namespace folly {
@@ -257,16 +258,12 @@ class StringResplitter : public Operator<StringResplitter> {
     static constexpr bool infinite = Source::infinite;
   };
 
-  template<class Source,
-           class Value,
-           class Gen = Generator<Source>>
+  template <class Source, class Value, class Gen = Generator<Source>>
   Gen compose(GenImpl<Value, Source>&& source) const {
     return Gen(std::move(source.self()), delimiter_, keepDelimiter_);
   }
 
-  template<class Source,
-           class Value,
-           class Gen = Generator<Source>>
+  template <class Source, class Value, class Gen = Generator<Source>>
   Gen compose(const GenImpl<Value, Source>& source) const {
     return Gen(source.self(), delimiter_, keepDelimiter_);
   }
@@ -308,8 +305,7 @@ class SplitStringSource
  *
  * This type is primarily used through the 'unsplit' function.
  */
-template<class Delimiter,
-         class Output>
+template <class Delimiter, class Output>
 class Unsplit : public Operator<Unsplit<Delimiter, Output>> {
   Delimiter delimiter_;
  public:
@@ -317,8 +313,7 @@ class Unsplit : public Operator<Unsplit<Delimiter, Output>> {
     : delimiter_(delimiter) {
   }
 
-  template<class Source,
-           class Value>
+  template <class Source, class Value>
   Output compose(const GenImpl<Value, Source>& source) const {
     Output outputBuffer;
     UnsplitBuffer<Delimiter, Output> unsplitter(delimiter_, &outputBuffer);
@@ -333,8 +328,7 @@ class Unsplit : public Operator<Unsplit<Delimiter, Output>> {
  *
  * This type is primarily used through the 'unsplit' function.
  */
-template<class Delimiter,
-         class OutputBuffer>
+template <class Delimiter, class OutputBuffer>
 class UnsplitBuffer : public Operator<UnsplitBuffer<Delimiter, OutputBuffer>> {
   Delimiter delimiter_;
   OutputBuffer* outputBuffer_;
@@ -345,8 +339,7 @@ class UnsplitBuffer : public Operator<UnsplitBuffer<Delimiter, OutputBuffer>> {
     CHECK(outputBuffer);
   }
 
-  template<class Source,
-           class Value>
+  template <class Source, class Value>
   void compose(const GenImpl<Value, Source>& source) const {
     // If the output buffer is empty, we skip inserting the delimiter for the
     // first element.
@@ -366,10 +359,10 @@ class UnsplitBuffer : public Operator<UnsplitBuffer<Delimiter, OutputBuffer>> {
 /**
  * Hack for static for-like constructs
  */
-template<class Target, class=void>
+template <class Target, class = void>
 inline Target passthrough(Target target) { return target; }
 
-#pragma GCC diagnostic push
+FOLLY_PUSH_WARNING
 #ifdef __clang__
 // Clang isn't happy with eatField() hack below.
 #pragma GCC diagnostic ignored "-Wreturn-stack-address"
@@ -385,9 +378,7 @@ inline Target passthrough(Target target) { return target; }
  *    | as<vector<tuple<int, string>>>();
  *
  */
-template<class TargetContainer,
-         class Delimiter,
-         class... Targets>
+template <class TargetContainer, class Delimiter, class... Targets>
 class SplitTo {
   Delimiter delimiter_;
  public:
@@ -410,7 +401,7 @@ class SplitTo {
   }
 };
 
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
 
 } // namespace detail