// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CRDTP_MAYBE_H_ #define CRDTP_MAYBE_H_ #include <cassert> #include <memory> namespace crdtp { // ============================================================================= // detail::PtrMaybe, detail::ValueMaybe, templates for optional // pointers / values which are used in ../lib/Forward_h.template. // ============================================================================= namespace detail { template <typename T> class PtrMaybe { … }; template <typename T> class ValueMaybe { … }; template <typename T> struct MaybeTypedef { … }; template <> struct MaybeTypedef<bool> { … }; template <> struct MaybeTypedef<int> { … }; template <> struct MaybeTypedef<double> { … }; template <> struct MaybeTypedef<std::string> { … }; } // namespace detail Maybe; } // namespace crdtp #endif // CRDTP_MAYBE_H_