zenustech / zeno

ZEn NOde system - a simulation & rendering engine in nodes
http://zenustech.com
Mozilla Public License 2.0
1.24k stars 150 forks source link

error: use 'template' keyword to treat 'has' as a dependent template name #1911

Closed Martinfx closed 5 months ago

Martinfx commented 5 months ago

Describe the bug (both Chinese and English are OK) I tried compile with clang and I have error with template

CMAKE_ON= ZENO_BUILD_EDITOR ZENO_MULTIPROCESS \ ZENO_IPC_USE_TCP ZENO_BUILD_SHARED ZENO_USE_CCACHE ZENO_NO_WARNING

CMAKE_OFF= ZENO_BUILD_PLAYER ZENO_BUILD_DESIGNER ZENO_INSTALL_TARGET ZENO_WITH_CUDA ZENO_MARCH_NATIVE ZENO_USE_FAST_MATH \ ZENO_OPTIX_PROC ZENO_WIN32_RC

How To Reproduce git clone this repo https://github.com/Martinfx/FreeBSD-Ports/pull/127/files sudo make

Screenshots

/zeno/work/zeno-2023.11.16/zeno/include/zeno/utils/PropertyVisitor.h:399:67: error: use 'template' keyword to treat 'has' as a dependent template name
  399 |                         if (!bIsOptional || Primitive->userData().has<ValueType>(KeyName)) {
      |                                                                   ^
      |                                                                   template 
/usr/home/maxfx/Documents/FreeBSD-Ports/zeno/work/zeno-2023.11.16/zeno/include/zeno/utils/PropertyVisitor.h:400:62: error: use 'template' keyword to treat 'get' as a dependent template name
  400 |                             ValueRef = Primitive->userData().get<ValueType>(KeyName);
      |                                                              ^
      |                                                              template 
/usr/home/maxfx/Documents/FreeBSD-Ports/zeno/work/zeno-2023.11.16/zeno/include/zeno/utils/PropertyVisitor.h:403:67: error: use 'template' keyword to treat 'has' as a dependent template name
  403 |                         if (!bIsOptional || Primitive->userData().has<ValueType>(KeyName)) {
      |                                                                   ^
      |                                                                   template 
/usr/home/maxfx/Documents/FreeBSD-Ports/zeno/work/zeno-2023.11.16/zeno/include/zeno/utils/PropertyVisitor.h:404:62: error: use 'template' keyword to treat 'get2' as a dependent template name
  404 |                             ValueRef = Primitive->userData().get2<ValueType>(KeyName);
      |                                                              ^
      |                                                              template 

Environment

Martinfx commented 5 months ago

patch is here for build with clang https://github.com/Martinfx/FreeBSD-Ports/pull/127/files#diff-2d934b270572b51fc6ab10a345c955fc352a035cf80788e392940d028ae436c6