facebookexperimental/object-introspection

Enum type template arguments do not match

Opened this issue · 0 comments

TreeBuilder V2 codegen automatically generates the declarations for traversal functions. For example:

template <typename DB, uint64_t N0, IssetBitsetOption_3 N1>
struct TypeHandler<DB, apache::thrift::detail::isset_bitset<N0, N1>> {
...

However, IssetBitsetOption_3 is the generated OI type and does not match the N1 type of the container. This results in:

oil_jit_code.cpp:364:65: error: value of type 'OIInternal::(anonymous namespace)::IssetBitsetOption_3' (aka 'unsigned int') is not implicitly convertible to 'apache::thrift::detail::IssetBitsetOption'
struct TypeHandler<DB, apache::thrift::detail::isset_bitset<N0, N1>> {
                                                                ^~
1 error generated.

It's possible that apache::thrift::detail::isset_bitset should be a pass through type, so if it's the only one affected then that change could be a solution. Else we might need something fancy to reinterpret our generated type as the underlying type.

Examples:

  • OilIntegration.thrift_namespaces_a