Skip to content

Commit

Permalink
Fixed falsely triggered static assert for properties on g++.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloshi committed Dec 27, 2016
1 parent 47b927d commit 8a77848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/dukglue/register_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void dukglue_register_property(duk_context* ctx, std::nullptr_t getter, std::nul
// strictly speaking I think duktape can probably handle neither
// (according to the wonderful API docs), but I don't know why you
// would want to do this in the first place
static_assert(false, "Must have getter or setter");
static_assert(std::is_void<Cls>::value, "Must have getter or setter");
}

inline duk_ret_t dukglue_throw_error(duk_context* ctx)
Expand Down Expand Up @@ -120,4 +120,4 @@ void dukglue_register_property(duk_context* ctx,
| DUK_DEFPROP_FORCE /* allow overriding built-ins and previously defined properties */;

duk_def_prop(ctx, -4, flags);
}
}

0 comments on commit 8a77848

Please sign in to comment.