Skip to content

Commit

Permalink
Revert erroneous change in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
parcollet committed Aug 2, 2024
1 parent 8126dea commit 3299e54
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions test/basicfun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,15 @@ namespace N {

// ========== Declare the module ==========

// #pragma clang diagnostic ignored "-Wunused-const-variable"

namespace c2py {
struct dispatch2_t{};
}

constexpr auto ddd(auto && ...x) {return c2py::dispatch2_t{};}
consteval int lambda(auto && x) {return 1;}//c2py::dispatch2_t{};}

constexpr auto mylambda = [](int x) {return x + 1;};
namespace c2py_module {

constexpr auto documentation = "Module documentation";
auto documentation = "Module documentation";

namespace add {
//auto f = c2py::dispatch<c2py::cast<int>(::f), c2py::cast<double>(::f)>;
constexpr auto h = c2py::dispatch<N::h<int>, N::h<double>>;
constexpr auto hf = c2py::dispatch<c2py::cast<int>(::f1), N::h<double>>;
// constexpr auto hf = c2py::dispatch<c2py::cast<int>(::f1), N::h<double>, +[](int x) {return x + 1;}>;

//constexpr auto hf2 = ddd(c2py::cast<int>(::f1), N::h<double>, [](int x) {return x + 1;});

constexpr auto with_lambda = c2py::dispatch<[](int x) {return x + 1;}>;
//constexpr auto with_lambda = c2py::dispatch<mylambda>;
auto h = c2py::dispatch<N::h<int>, N::h<double>>;
auto hf = c2py::dispatch<c2py::cast<int>(::f1), N::h<double>>;

} // namespace add

} // namespace c2py_module

0 comments on commit 3299e54

Please sign in to comment.