wasphin commented on code in PR #3547:
URL: https://github.com/apache/brpc/pull/3547#discussion_r4023001264
##########
src/butil/containers/optional.h:
##########
@@ -199,14 +199,15 @@ class optional {
_storage.Init(std::move(value));
}
- template <typename... Args,
- std::enable_if<std::is_constructible<T, Args&&...>::value>* =
nullptr>
- explicit optional(const in_place_t, Args&&... args) : _engaged(true) {
+ template <typename... Args, typename std::enable_if<
+ std::is_constructible<T, Args&&...>::value, bool>::type = false>
Review Comment:
something like bellow in C++14 is more clear
```
template <typename... Args,
std::enable_if_t<std::is_constructible<T, Args&&...>::value, int>
= 0>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]