Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cte_mapper_type" Not a class or namespace name #1400

Closed
menghe0311 opened this issue Feb 17, 2025 · 8 comments · Fixed by #1401
Closed

"cte_mapper_type" Not a class or namespace name #1400

menghe0311 opened this issue Feb 17, 2025 · 8 comments · Fixed by #1401

Comments

@menghe0311
Copy link

template<class Moniker, class ColAlias, class DBOs, satisfies<is_db_objects, DBOs> = true>
constexpr decltype(auto) materialize_column_pointer(const DBOs&,
const column_pointer<Moniker, alias_holder>&) {
using table_type = storage_pick_table_t<Moniker, DBOs>;
using cte_mapper_type = cte_mapper_type_t<table_type>;

// lookup ColAlias in the final column references
using colalias_index =
    find_tuple_type<typename cte_mapper_type::final_colrefs_tuple, alias_holder<ColAlias>>;
static_assert(colalias_index::value < std::tuple_size_v<typename cte_mapper_type::final_colrefs_tuple>,
              "No such column mapped into the CTE.");

return &aliased_field<
    ColAlias,
    std::tuple_element_t<colalias_index::value, typename cte_mapper_type::fields_type>>::field;

}

@trueqbit
Copy link
Collaborator

trueqbit commented Feb 17, 2025

@menghe0311 Do you have any details or can we close this issue?

@menghe0311
Copy link
Author

VS2019 MFC project adds "sqlite_orm.h" header file, error C2653 "cte_mapper_type" not a class or namespace name during compilation

@trueqbit
Copy link
Collaborator

@menghe0311 Sorry mate, but this is not a proper issue report. Everything works on our side.

@fnc12
Copy link
Owner

fnc12 commented Feb 18, 2025

@menghe0311 probably you need to update sqlite_orm version. Similar issue existed several versions ago

@menghe0311
Copy link
Author

using colalias_index =
find_tuple_type<typename cte_mapper_type_t<table_type>::final_colrefs_tuple, alias_holder>;

The version I am using is already the latest version. Changing to the above format can work normally. In addition, some people have encountered the same problem with the closed issue.

@trueqbit
Copy link
Collaborator

trueqbit commented Feb 18, 2025

@menghe0311 Can you finally provide enough context and details such that someone can reproduce the error, please? Exact sqlite_orm version, exact Visual C++/msvc compiler version, build settings (compiler flags), compiler output, complete minimally reproducible test code. Thank you for your kind cooperation.

@trueqbit
Copy link
Collaborator

Duplicate of #1343.

@trueqbit trueqbit moved this to In Progress in sqlite_orm public board Feb 18, 2025
@trueqbit trueqbit linked a pull request Feb 18, 2025 that will close this issue
@trueqbit trueqbit moved this from In Progress to Done in sqlite_orm public board Feb 19, 2025
@trueqbit trueqbit closed this as completed by moving to Done in sqlite_orm public board Feb 19, 2025
@menghe0311
Copy link
Author

menghe0311 commented Feb 20, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants