/*
- * 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.
#endif
#include <folly/Conv.h>
+#include <folly/Portability.h>
#include <folly/String.h>
namespace folly {
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_);
}
*
* 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:
: 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);
*
* 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_;
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.
/**
* 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"
* | as<vector<tuple<int, string>>>();
*
*/
-template<class TargetContainer,
- class Delimiter,
- class... Targets>
+template <class TargetContainer, class Delimiter, class... Targets>
class SplitTo {
Delimiter delimiter_;
public:
}
};
-#pragma GCC diagnostic pop
+FOLLY_POP_WARNING
-} // namespace detail
+} // namespace detail
-} // namespace gen
-} // namespace folly
+} // namespace gen
+} // namespace folly