Информация об изменениях

Сообщение Re[2]: Анализ списка параметров лямбды от 06.02.2025 23:17

Изменено 06.02.2025 23:20 rg45

Re[2]: Анализ списка параметров лямбды
Здравствуйте, kov_serg, Вы писали:

_>Это смотрели https://github.com/HexadigmSystems/FunctionTraits ?


Может, я чего-то не понял. Но, судя по тому, что я вижу, эта штука в шаблоны не умеет:

https://godbolt.org/z/KG8xo747E

#include "CompilerVersions.h"
#include "TypeTraits.h"

#include <iostream>

int main()
{
    auto f = [](int, double, const char*){};
    using F = decltype(f);
    StdExt::DisplayAllFunctionTraits<F>(std::cout);

#if 0
    auto g = [](int, double, const char*, auto&&){};
    using G = decltype(g);
    StdExt::DisplayAllFunctionTraits<G>(std::cout); // error: no matching function for call to
#endif
}
Re[2]: Анализ списка параметров лямбды
Здравствуйте, kov_serg, Вы писали:

_>Это смотрели https://github.com/HexadigmSystems/FunctionTraits ?


Может, я чего-то не понял. Но, судя по тому, что я вижу, эта штука в шаблоны не умеет:

https://godbolt.org/z/KG8xo747E

#include "CompilerVersions.h"
#include "TypeTraits.h"

#include <iostream>

int main()
{
    auto f = [](int, double, const char*){};
    using F = decltype(f);
    StdExt::DisplayAllFunctionTraits<F>(std::cout);

#if 0
    auto g = [](int, double, const char*, auto&&){};
    using G = decltype(g);
    StdExt::DisplayAllFunctionTraits<G>(std::cout); // error: no matching function for call to
#endif
}