[odb-users] clang says object_id is a dependent template name

Daniel James danielpeterjames at gmail.com
Mon Jul 2 14:25:53 EDT 2012


Around line 176 in lazy-ptr.ixx, as per the code snippet below, (and
elsewhere), a recent clang is objecting* and suggesting that object_id
is a dependent template name in need of the template keyword being

  template <class T>
  template <class O>
  inline typename object_traits<O>::id_type lazy_ptr<T>::
  object_id () const
    typedef typename object_traits<T>::object_type object_type;

    return p_ ? object_traits<object_type>::id (*p_) : i_.template
object_id<O> ();

I haven't thought about this too carefully or investigated the types
or standard to see if I agree with the compiler. It is refusing to
compile at present though.

Thanks for any advice,


*screen shot attached
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2012-07-02 at 19.16.10.png
Type: image/png
Size: 34044 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20120702/a5926a07/ScreenShot2012-07-02at19.16.10-0001.png

More information about the odb-users mailing list