[odb-users] internal compiler error: cult:compiler::context::no_entry

MM finjulhich at gmail.com
Sat Oct 6 11:11:35 EDT 2018


On Fri, 5 Oct 2018 at 13:04, Boris Kolpackov <boris at codesynthesis.com>
wrote:

> MM <finjulhich at gmail.com> writes:
>
> > Right before throwing, I added this code:
> >
> > std::cerr <<"Cannot get key: "<< key<<std::endl;
> >
> > which produces:
> >
> > Cannot get key: column-id-type
>
> Ok, then everything looks normal. A reproducer would, of course, be
> ideal. Failed that, try to print the name of the data member and show
> its and related definitions in your header file.


I've printed the data member path like so:

>  static string
>     id_column_type ()
>     {
>       context& c (context::current ());
>       data_member_path& id (*context::id_member (*c.top_object));
>       const auto& idvec =
> static_cast<std::vector<semantics::data_member*>&>(id);
>       for (const auto* m: idvec)
> std::cerr << "data member="<< m->fq_name() <<std::endl;
>       return id.back ()->get<string> ("column-id-type");
>     }


key = "column-id-type"
data member=::NS1::NS2::BaseClass::id_

namespace NS1 { namespace NS2 {
class BaseClass {
protected:
   std::uint32_t id_;
};
}}

id_ is a protected member of BaseClass and its c++ type is  std::uint32_t

A empty derived class is defined:

> class DerivedClass : public BaseClass {};


The pragmas look like so:

#include "DerivedClass.h"
#pragma db object(BaseClass) polymorphic table("eqlogb") transient
definition
#pragma db member(BaseClass::id_) id unique
#pragma db object(DerivedClass) abstract table("eqlogbl") transient
definition

I have added

> type("INTEGER") and id_type("INTEGER")

to the pragma for id_

The no_entry exception is still thrown.

MM


More information about the odb-users mailing list