kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Danil Chapovalov | 9dce71b | 2018-06-11 07:48:31 +0000 | [diff] [blame] | 11 | // TODO(bugs.webrtc.org/9078): Use absl::optional directly. |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 12 | #ifndef API_OPTIONAL_H_ |
| 13 | #define API_OPTIONAL_H_ |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 14 | |
Danil Chapovalov | 9dce71b | 2018-06-11 07:48:31 +0000 | [diff] [blame] | 15 | #include "absl/types/optional.h" |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 16 | |
| 17 | namespace rtc { |
| 18 | |
Danil Chapovalov | 9dce71b | 2018-06-11 07:48:31 +0000 | [diff] [blame] | 19 | using absl::nullopt_t; |
| 20 | using absl::nullopt; |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 21 | |
| 22 | template <typename T> |
Danil Chapovalov | 9dce71b | 2018-06-11 07:48:31 +0000 | [diff] [blame] | 23 | using Optional = absl::optional<T>; |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 24 | |
| 25 | } // namespace rtc |
| 26 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 27 | #endif // API_OPTIONAL_H_ |