WPILibC++
2020.3.2
optional.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in the root directory of */
5
/* the project. */
6
/*----------------------------------------------------------------------------*/
7
8
#ifndef WPIUTIL_WPI_OPTIONAL_H_
9
#define WPIUTIL_WPI_OPTIONAL_H_
10
11
// clang-format off
12
13
#ifdef _MSC_VER
14
#pragma message("warning: wpi/optional.h is deprecated; include <optional> instead")
15
#else
16
#warning "wpi/optional.h is deprecated; include <optional> instead"
17
#endif
18
19
#include <optional>
20
21
namespace
wpi
{
22
23
template
<
typename
T>
24
using
optional [[deprecated(
"use std::optional"
)]] = std::optional<T>;
25
26
using
nullopt_t [[deprecated(
"use std::nullopt_t"
)]] = std::nullopt_t;
27
28
[[deprecated(
"use std::nullopt"
)]]
inline
constexpr std::nullopt_t nullopt =
29
std::nullopt;
30
31
}
// namespace wpi
32
33
// clang-format on
34
35
#endif // WPIUTIL_WPI_OPTIONAL_H_
wpi
WPILib C++ utilities (wpiutil) namespace.
Definition:
EventLoopRunner.h:17
wpiutil
src
main
native
include
wpi
optional.h
Generated on Fri Feb 21 2020 08:50:37 for WPILibC++ by
1.8.16