constexpr in derived buffers

fix #657
This commit is contained in:
Vinnie Falco
2017-07-28 17:07:24 -07:00
parent 18a698f7f6
commit df73241a60
3 changed files with 29 additions and 0 deletions
+1
View File
@@ -6,6 +6,7 @@ Version 91:
* Tidy up namespace qualifiers
* Tidy up MSVC CMakeLists.txt
* Optimize buffered_read_stream
* constexpr in derived buffers
WebSocket:
@@ -235,6 +235,20 @@ public:
{
return *this;
}
/// Return the maximum sum of the input and output sequence sizes.
std::size_t constexpr
max_size() const
{
return N;
}
/// Return the maximum sum of input and output sizes that can be held without an allocation.
std::size_t constexpr
capacity() const
{
return N;
}
};
} // beast
@@ -216,6 +216,20 @@ public:
{
return *this;
}
/// Return the maximum sum of the input and output sequence sizes.
std::size_t constexpr
max_size() const
{
return N;
}
/// Return the maximum sum of input and output sizes that can be held without an allocation.
std::size_t constexpr
capacity() const
{
return N;
}
};
} // beast