Home » U++ Library support » U++ Core » How to mark std::array<T, N> moveable if only T is moveable
Re: How to mark std::array<T, N> moveable if only T is moveable [message #60703 is a reply to message #60702] |
Thu, 25 July 2024 09:32   |
 |
mirek
Messages: 14267 Registered: November 2005
|
Ultimate Member |
|
|
mirek wrote on Thu, 25 July 2024 09:19
Another thing to consider: Tuple is moveable if all its components are moveable. Are we able to express that somehow? (If not, no big deal, I can make Tuple moveable and request that elements are).
Figured it out:
struct not_moveable {};
template <class A, class B>
class Two : std::conditional<is_moveable<A> && is_moveable<B>, moveable<Two<A, B>>, not_moveable>::type {
A a;
B b;
};
[Updated on: Thu, 25 July 2024 09:32] Report message to a moderator
|
|
|
 |
|
How to mark std::array<T, N> moveable if only T is moveable
By: busiek on Tue, 02 July 2024 17:54
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Lance on Wed, 03 July 2024 03:39
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Thu, 18 July 2024 08:41
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: busiek on Tue, 23 July 2024 18:25
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Thu, 25 July 2024 02:27
|
 |
 |
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Lance on Thu, 25 July 2024 03:16
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Thu, 25 July 2024 09:19
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Thu, 25 July 2024 09:32
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Thu, 25 July 2024 10:07
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Lance on Fri, 26 July 2024 00:00
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: busiek on Thu, 25 July 2024 17:32
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Mon, 29 July 2024 08:47
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Fri, 23 August 2024 08:54
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Thu, 18 July 2024 08:44
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: busiek on Thu, 18 July 2024 19:39
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Fri, 19 July 2024 13:11
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Lance on Fri, 19 July 2024 13:52
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Lance on Fri, 19 July 2024 14:02
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Didier on Fri, 19 July 2024 19:10
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: mirek on Mon, 22 July 2024 11:10
|
 |
|
Re: How to mark std::array<T, N> moveable if only T is moveable
By: Lance on Tue, 23 July 2024 01:07
|
Goto Forum:
Current Time: Thu Aug 07 22:08:30 CEST 2025
Total time taken to generate the page: 0.03524 seconds
|