This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Vector2d: Static assertion when accessing invalid member

Tags: None
(comma "," separated)
vdaanen
Registered Member
Posts
1
Karma
0
Hello,

the Vector2d class proposes the following functions: Vector2d::z() and Vector2d::w().
When calling these functions, a runtime assertion is raised.

Is there a reason to let the code compile? code would be safer if a static assertion is raised when calling e.g Vector2d::z() or Vector2d::w()

V
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Indeed, those could be turned into static assertions...


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft