compiling modules C++ 20 with g++ 12.2.0

I am using the following commands:

1
2
g++ -std=c++20 -fmodules-ts -c -x c++ cxx_type_traits_polyfill.ixx
g++ -std=c++20 -fmodules-ts -c -x c++ type_traits.ixx


The first module does not have dependencies the second does. I have not found a way to tell the second file that it can solve its dependencies with the first file...

upon executing the second command line we get:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
type_traits.ixx:17:41: error: 'disjunction' in namespace 'sqlite_orm::internal::polyfill' does not name a template type
   17 |             using is_any_of = polyfill::disjunction<std::is_same<T, Types>...>;
      |                                         ^~~~~~~~~~~
type_traits.ixx:25:61: error: 'negation_v' is not a member of 'sqlite_orm::internal::polyfill'; did you mean 'std::negation_v<_Pp>'?
   25 |             using match_if_not = std::enable_if_t<polyfill::negation_v<Op<Args...>>>;
      |                                                             ^~~~~~~~~~
In file included from type_traits.h:3,
                 from type_traits.ixx:4:
Q:/msys64/mingw64/include/c++/12.2.0/type_traits:218:27: note: 'std::negation_v<_Pp>' declared here
  218 |     inline constexpr bool negation_v = negation<_Pp>::value;
      |                           ^~~~~~~~~~
type_traits.ixx:25:82: error: template argument 1 is invalid
   25 |             using match_if_not = std::enable_if_t<polyfill::negation_v<Op<Args...>>>;
      |                                                                                  ^~
type_traits.ixx:25:39: error: '<expression error>' in namespace 'std' does not name a type
   25 |             using match_if_not = std::enable_if_t<polyfill::negation_v<Op<Args...>>>;
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
type_traits.ixx:37:62: error: 'negation' is not a member of 'sqlite_orm::internal::polyfill'; did you mean 'std::negation'?
   37 |             using satisfies_not = std::enable_if_t<polyfill::negation<Op<Args...>>::value, bool>;
      |                                                              ^~~~~~~~
Q:/msys64/mingw64/include/c++/12.2.0/type_traits:204:12: note: 'std::negation' declared here
  204 |     struct negation
      |            ^~~~~~~~
type_traits.ixx:37:81: error: template argument 1 is invalid
   37 |             using satisfies_not = std::enable_if_t<polyfill::negation<Op<Args...>>::value, bool>;
      |                                                                                 ^~
type_traits.ixx:7:8: warning: not writing module 'type_traits' due to errors
    7 | export module type_traits;
      |        ^~~~~~


what is going on?


Please some light?

Take a look at this:

sqlite_orm::internal::polyfill

Is that the namespace you want?
Topic archived. No new replies allowed.