Как упорядочить типы во время компиляции?C++

Программы на C++. Форум разработчиков
Anonymous
Как упорядочить типы во время компиляции?

Сообщение Anonymous »

Рассмотрим следующую программу:

Код: Выделить всё

#include 
#include 
#include 
#include 

template 
struct ordered {};

template 
struct ordered
{
using type = /* a reordered tuple */;
};

template 
using ordered_t = typename ordered::type;

int main(int argc, char* argv[])
{
using type1 = std::tuple;
using type2 = std::tuple;
std::cout 

Подробнее здесь: [url]https://stackoverflow.com/questions/48723974/how-to-order-types-at-compile-time[/url]

Вернуться в «C++»