Migrate to C++17 and refactor
Change-Id: I53407266939258990a1c3a9363c3ebe9ea113fd2
diff --git a/src/detail/ca-request-state.hpp b/src/detail/ca-request-state.hpp
index 2c4a1d6..5fbb8f7 100644
--- a/src/detail/ca-request-state.hpp
+++ b/src/detail/ca-request-state.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2021, Regents of the University of California.
+ * Copyright (c) 2017-2022, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -27,7 +27,7 @@
namespace ndncert {
-typedef std::array<uint8_t, 8> RequestId;
+using RequestId = std::array<uint8_t, 8>;
enum class Status : uint16_t {
BEFORE_CHALLENGE = 0,
@@ -127,7 +127,7 @@
/**
* @brief The challenge state.
*/
- optional<ChallengeState> challengeState;
+ std::optional<ChallengeState> challengeState;
};
std::ostream&