microsoft / ifc-spec

IFC format specification
Creative Commons Attribution 4.0 International
71 stars 7 forks source link

Extraneous TypeSort::Pointer in Expression representing a Template Argument #137

Closed DarkArc closed 10 months ago

DarkArc commented 11 months ago

Compiling the following snippet to an IFC file:

template <class>
struct _Is_member_object_pointer {
    static constexpr bool value = false;
};

template <class _Ty1, class _Ty2>
struct _Is_member_object_pointer<_Ty1 _Ty2::*> {
};

The template argument list for the specialization of _Is_member_object_pointer represents _Ty1 _Ty2::* as a ExprSort::Type with a denotation value that's a TypeSort::Pointer type with a pointee that's a TypeSort::PointerToMember. I believe the TypeSort::Pointer is extraneous and the denotation should directly reference the TypeSort::PointerToMember type.

GabrielDosReis commented 10 months ago

I believe the TypeSort::Pointer is extraneous and the denotation should directly reference the TypeSort::PointerToMember type.

Fully agreed. That is a bug in the MSVC compiler (as opposed to the IFC Spec). I refilled your issue here: https://developercommunity.visualstudio.com/t/modules-IFC-Extraneous-TypeSort::Poi/10492443

Closing this issue since it is now being tracked as a bug in the MSVC toolset.