Skip to content

Clang : error on explicit specialization of 'CLASS_NAME' #150

@olivier-stasse

Description

@olivier-stasse

On clang, when calling the macro DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN in feature-pose.cpp:

sot_ws/src/sot/sot-core/src/feature/feature-pose.cpp:45:13: error: explicit specialization of 'CLASS_NAME' after instantiation
template <> DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeaturePose_t, "FeaturePose");
             ^
/usr/local/include/dynamic-graph/factory.h:28:32: note: expanded from macro 'DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN'
   const std::string CLASSTYPE::CLASS_NAME = CLASSNAME;                         \
                                ^
sot_ws/src/sot/sot-core/include/sot/core/feature-pose.hh:172:39: note: explicit instantiation first required here
 extern template class SOT_CORE_DLLAPI FeaturePose<R3xSO3Representation>;
                                       ^
sot_ws/src/sot/sot-core/src/feature/feature-pose.cpp:47:1: error: explicit specialization of 'CLASS_NAME' after instantiation
 DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeaturePoseSE3_t, "FeaturePoseSE3");
 ^
 /usr/local/include/dynamic-graph/factory.h:28:32: note: expanded from macro 'DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN'
   const std::string CLASSTYPE::CLASS_NAME = CLASSNAME;                         \
                                ^
sot_ws/src/sot/sot-core/include/sot/core/feature-pose.hh:171:39: note: explicit instantiation first required here
 extern template class SOT_CORE_DLLAPI FeaturePose<SE3Representation>;

clang version:

Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions