Path: blob/main/contrib/llvm-project/libcxx/include/__concepts/assignable.h
35262 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef _LIBCPP___CONCEPTS_ASSIGNABLE_H9#define _LIBCPP___CONCEPTS_ASSIGNABLE_H1011#include <__concepts/common_reference_with.h>12#include <__concepts/same_as.h>13#include <__config>14#include <__type_traits/is_reference.h>15#include <__type_traits/make_const_lvalue_ref.h>16#include <__utility/forward.h>1718#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)19# pragma GCC system_header20#endif2122_LIBCPP_BEGIN_NAMESPACE_STD2324#if _LIBCPP_STD_VER >= 202526// [concept.assignable]2728template <class _Lhs, class _Rhs>29concept assignable_from =30is_lvalue_reference_v<_Lhs> &&31common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> &&32requires(_Lhs __lhs, _Rhs&& __rhs) {33{ __lhs = std::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;34};3536#endif // _LIBCPP_STD_VER >= 203738_LIBCPP_END_NAMESPACE_STD3940#endif // _LIBCPP___CONCEPTS_ASSIGNABLE_H414243