Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
regular_concept.hpp
Go to the documentation of this file.
1/*
2 Copyright 2013 Adobe
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5*/
6/**************************************************************************************************/
7
8#ifndef ADOBE_REGULAR_HPP
9#define ADOBE_REGULAR_HPP
10
11/**************************************************************************************************/
12
13#ifdef ADOBE_HAS_CPLUS0X_CONCEPTS
14
15/**************************************************************************************************/
16
17#include <concepts>
18
19/**************************************************************************************************/
20
21namespace adobe {
22
23/**************************************************************************************************/
24
25auto concept RegularConcept<typename T> : std::CopyConstructible<T>,
26 std::Assignable<T>,
27 std::EqualityComparable<T>,
28 std::Swappable<T>,
29 std::DefaultConstructible<T> // not yet
30 {};
31
32/**************************************************************************************************/
33
34} // namespace adobe
35
36/**************************************************************************************************/
37
38#else
39
40/**************************************************************************************************/
41
42#include <algorithm>
43
44#include <boost/concept_check.hpp>
45
46/**************************************************************************************************/
47
48namespace adobe {
49
50/**************************************************************************************************/
51
52template <class T>
54
55 // Concept checking:
56
57 void constraints() {
58 // refinement of:
59 boost::function_requires<boost::CopyConstructibleConcept<T>>();
60 boost::function_requires<boost::AssignableConcept<T>>();
61 boost::function_requires<boost::EqualityComparableConcept<T>>();
62 // boost::function_requires<boost::SwappableConcept<T> >();
63
64 using std::swap;
65 swap(t, t);
66 }
67#if !defined(ADOBE_NO_DOCUMENTATION)
68 T t;
69#endif
70};
71
72/**************************************************************************************************/
73
74} // namespace adobe
75
76/**************************************************************************************************/
77
78#endif
79
80/**************************************************************************************************/
81
82#endif
void swap(any_regular_t &x, any_regular_t &y)
void swap(adobe::extents_t::slice_t &x, adobe::extents_t::slice_t &y) BOOST_NOEXCEPT
Definition extents.hpp:120