View Issue Details

IDProjectCategoryView StatusLast Update
0001843NoesisGUIC++ SDKpublic2020-12-01 18:26
ReporterCravenWarrior3Assigned Tojsantos 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.7 
Target Version3.0.8Fixed in Version3.0.8 
Summary0001843: Missing "template" statements in TypePropertyUtil.h
DescriptionPartly into compiling a game which uses NoesisGUI, errors with the "expect primary-expression before 'char' token" format are thrown. Lines 34, 40, 46, 47, 66, 72, 84, and 90 of Include/NsCore/TypePropertyUtil.h are referenced in the error message.

Adding "template" to the appropriate location on each line fixes the error and ensures successful compilation of the program afterwards. The issue is relatively minor and simple to fix although no other files generated the error message.
Steps To ReproduceDiscovered the issue while attempting to compile Ingnomia on Ubuntu 20.10, NoesisGUI was compiled using the Debug setting.
TagsC++
PlatformLinux

Activities

CravenWarrior3

CravenWarrior3

2020-11-26 05:33

reporter  

Log.txt (4,434 bytes)
Scanning dependencies of target NoesisApp
make[2]: Leaving directory '/mnt/ssd/Projects/Ingnomia/build'
make[2]: Entering directory '/mnt/ssd/Projects/Ingnomia/build'
[ 17%] Building CXX object 3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/cmake_pch.hxx.gch
In file included from /mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NoesisPCH.h:14,
                 from /mnt/ssd/Projects/Ingnomia/3rdparty/NoesisApp/pch.h:2,
                 from /mnt/ssd/Projects/Ingnomia/build/3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/cmake_pch.hxx:5,
                 from <command-line>:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘Noesis::Ptr<Noesis::BaseComponent> Noesis::GetComponent(const Noesis::TypeProperty*, const void*, Noesis::NonRefCountedType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:34:35: error: expected primary-expression before ‘>’ token
   34 |     return Boxing::Box(prop->Get<T>(ptr));
      |                                   ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘Noesis::Ptr<Noesis::BaseComponent> Noesis::GetComponent(const Noesis::TypeProperty*, const void*, Noesis::PtrRefCountedType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:40:53: error: expected primary-expression before ‘>’ token
   40 |     return DynamicPtrCast<BaseComponent>(prop->Get<T>(ptr));
      |                                                     ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘Noesis::Ptr<Noesis::BaseComponent> Noesis::GetComponent(const Noesis::TypeProperty*, const void*, Noesis::PointerRefCountedType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:46:30: error: expected primary-expression before ‘(’ token
   46 |     return Ptr<BaseComponent>(const_cast<BaseComponent*>(
      |                              ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:47:54: error: expected primary-expression before ‘>’ token
   47 |         DynamicCast<const BaseComponent*>(prop->Get<T>(ptr))));
      |                                                      ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::NonCharPointerType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:66:16: error: expected primary-expression before ‘>’ token
   66 |     prop->Set<T>(ptr, value != 0 ? Boxing::Unbox<T>(value) : T());
      |                ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::CharPointerType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:72:16: error: expected primary-expression before ‘>’ token
   72 |     prop->Set<T>(ptr, value != 0 ? Boxing::Unbox<String>(value).Str() : "");
      |                ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::PtrRefCountedType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:84:16: error: expected primary-expression before ‘>’ token
   84 |     prop->Set<T>(ptr, T(DynamicCast<typename T::Type*>(value)));
      |                ^
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h: In function ‘void Noesis::SetComponent(const Noesis::TypeProperty*, void*, Noesis::BaseComponent*, Noesis::PointerRefCountedType)’:
/mnt/ssd/Projects/Dependencies/NoesisGUI/Include/NsCore/TypePropertyUtil.h:90:16: error: expected primary-expression before ‘>’ token
   90 |     prop->Set<T>(ptr, DynamicCast<T>(value));
      |                ^
make[2]: *** [3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/build.make:252: 3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/cmake_pch.hxx.gch] Error 1
make[2]: Leaving directory '/mnt/ssd/Projects/Ingnomia/build'
make[1]: *** [CMakeFiles/Makefile2:312: 3rdparty/NoesisApp/CMakeFiles/NoesisApp.dir/all] Error 2
make[1]: Leaving directory '/mnt/ssd/Projects/Ingnomia/build'
make: *** [Makefile:130: all] Error 2
Log.txt (4,434 bytes)
jsantos

jsantos

2020-11-26 10:53

manager   ~0006824

Could you please indicate gcc version and, if possible, a patch with the changes? Thanks!
CravenWarrior3

CravenWarrior3

2020-11-26 15:23

reporter  

TypePropertyUtil.h (3,643 bytes)
CravenWarrior3

CravenWarrior3

2020-11-26 15:23

reporter   ~0006829

I'm using version 10.2.0 of gcc. Here's the edited file that fixes the issue I'm having.
jsantos

jsantos

2020-12-01 18:26

manager   ~0006852

Thanks for this!

Issue History

Date Modified Username Field Change
2020-11-26 05:33 CravenWarrior3 New Issue
2020-11-26 05:33 CravenWarrior3 Tag Attached: C++
2020-11-26 05:33 CravenWarrior3 File Added: Log.txt
2020-11-26 10:49 jsantos Assigned To => jsantos
2020-11-26 10:49 jsantos Status new => assigned
2020-11-26 10:49 jsantos Target Version => 3.0.8
2020-11-26 10:53 jsantos Status assigned => feedback
2020-11-26 10:53 jsantos Note Added: 0006824
2020-11-26 15:23 CravenWarrior3 File Added: TypePropertyUtil.h
2020-11-26 15:23 CravenWarrior3 Note Added: 0006829
2020-11-26 15:23 CravenWarrior3 Status feedback => assigned
2020-12-01 18:26 jsantos Note Added: 0006852
2020-12-01 18:26 jsantos Status assigned => resolved
2020-12-01 18:26 jsantos Resolution open => fixed
2020-12-01 18:26 jsantos Fixed in Version => 3.0.8