Home » U++ Library support » U++ Core » How to mark std::array<T, N> moveable if only T is moveable
How to mark std::array<T, N> moveable if only T is moveable [message #60668] |
Tue, 02 July 2024 17:54  |
busiek
Messages: 70 Registered: February 2011 Location: Poland
|
Member |
|
|
Hi all,
U++ does not have a container with std::array functionality. Is there any simple way to mark std::array<T, N> moveable if only T is moveable?
I didn't come with anything better than implementing my own version of std::array derived from Moveable<MyArray<T, N>>. By using macro NTL_MOVEABLE one can only mark moveable a specific type not a template. Even if I want to mark specific template type, macro does not work with template types having two or more parameters and I have to expand macro myself:
template<> inline void AssertMoveable<std::array<double, 2>>(std::array<double, 2>*) {}
Correct me if I miss something. Shouldn't the mechanism of marking type moveable be done through partial class instantiation? Or concepts with C++20?
|
|
|
 |
|
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 19:47:10 CEST 2025
Total time taken to generate the page: 0.04122 seconds
|