From: Tudor Bosman Date: Wed, 14 Nov 2012 02:09:24 +0000 (-0800) Subject: static constexpr in enclosing class + lambdas make compilers unhappy? X-Git-Tag: v0.22.0~1137 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b24f3cf83407530de731381418ead92ffcaddec3;p=folly.git static constexpr in enclosing class + lambdas make compilers unhappy? Test Plan: build Reviewed By: dneiter@fb.com FB internal diff: D630324 --- diff --git a/folly/experimental/StringGen-inl.h b/folly/experimental/StringGen-inl.h index 84c42492..e3ad981b 100644 --- a/folly/experimental/StringGen-inl.h +++ b/folly/experimental/StringGen-inl.h @@ -48,7 +48,6 @@ class StringResplitter : public Operator { class Generator : public GenImpl> { Source source_; char delimiter_; - static constexpr size_t kDefaultLineSize = 256; public: Generator(Source source, char delimiter) : source_(std::move(source)), delimiter_(delimiter) { } @@ -85,6 +84,7 @@ class StringResplitter : public Operator { if (!buffer) { // Arbitrarily assume that we have half a line and get enough // room for twice that. + constexpr size_t kDefaultLineSize = 256; buffer = IOBuf::create(std::max(kDefaultLineSize, 2 * in.size())); } buffer->reserve(0, in.size());