Skip to content

Commit

Permalink
Update Enum.h
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Mar 8, 2023
1 parent b047242 commit 4d96e1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/LuaBridge/detail/Enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma once

#include "Config.h"
#include "Errors.h"
#include "LuaHelpers.h"
#include "Stack.h"

Expand All @@ -16,9 +17,11 @@ namespace luabridge {
/**
* @brief LuaBridge enum wrapper for enums as integers.
*
* Use this when you need maximum speed and could sacrifice safety. An enum exposed with this class will just be decayed to lua
* as integer. It's responsibility of the developer to make sure that a lua integer could be converted back to C++. Failing to validate a lua
* An enum exposed with this class will just be decayed to lua as integer. It's responsibility of
* the developer to make sure that a lua integer could be converted back to C++. Failing to validate a lua
* integer before converting to the corresponding C++ enum value could lead to a C++ enum that has no defined value.
*
* For improved security, specify which values the enum will have, so runtime validation could be performed.
*/
template <class T, T... Values>
struct Enum
Expand Down

0 comments on commit 4d96e1e

Please sign in to comment.