// 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. #include "base/types/pass_key.h" #include <concepts> #include <utility> namespace base { namespace { class Manager; // May not be created without a PassKey. class Restricted { … }; Restricted ConstructWithCopiedPassKey(base::PassKey<Manager> key) { … } Restricted ConstructWithMovedPassKey(base::PassKey<Manager> key) { … } class Manager { … }; static_assert …; static_assert …; static_assert …; static_assert …; } // namespace } // namespace base