kwiberg | 2b11fd2 | 2016-09-09 03:35:24 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "api/optional.h" |
kwiberg | 2b11fd2 | 2016-09-09 03:35:24 -0700 | [diff] [blame] | 12 | |
| 13 | namespace rtc { |
| 14 | namespace optional_internal { |
| 15 | |
| 16 | #if RTC_HAS_ASAN |
| 17 | |
Hans Wennborg | bda78c9 | 2018-04-10 12:36:59 +0200 | [diff] [blame] | 18 | const void* FunctionThatDoesNothingImpl(const void* x) { |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 19 | return x; |
| 20 | } |
kwiberg | 2b11fd2 | 2016-09-09 03:35:24 -0700 | [diff] [blame] | 21 | |
| 22 | #endif |
| 23 | |
Oskar Sundbom | e403212 | 2017-11-15 12:24:28 +0100 | [diff] [blame] | 24 | struct NulloptArg { |
| 25 | constexpr NulloptArg() {} |
| 26 | }; |
| 27 | |
| 28 | static NulloptArg nullopt_arg; |
| 29 | |
kwiberg | 2b11fd2 | 2016-09-09 03:35:24 -0700 | [diff] [blame] | 30 | } // namespace optional_internal |
Oskar Sundbom | e403212 | 2017-11-15 12:24:28 +0100 | [diff] [blame] | 31 | |
| 32 | const nullopt_t nullopt(rtc::optional_internal::nullopt_arg); |
| 33 | |
kwiberg | 2b11fd2 | 2016-09-09 03:35:24 -0700 | [diff] [blame] | 34 | } // namespace rtc |