Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/bindings/generator.h

Issue 29714558: Noissue - use static_assert for SFINAE for better error messaging (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created March 5, 2018, 11:41 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/StringMap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/bindings/generator.h
diff --git a/compiled/bindings/generator.h b/compiled/bindings/generator.h
index aec8cda3c87aa3f868f7b56584890fae1c218593..b488d66bfd2d5400853f8416a8280f017434c47d 100644
--- a/compiled/bindings/generator.h
+++ b/compiled/bindings/generator.h
@@ -221,10 +221,10 @@ namespace bindings_internal
}
template<typename ClassType,
- typename BaseClass = bindings_internal::NoBaseClass,
- typename std::enable_if<std::is_base_of<ref_counted, ClassType>::value>::type* = nullptr>
+ typename BaseClass = bindings_internal::NoBaseClass>
class class_
{
+ static_assert(std::is_base_of<ref_counted, ClassType>::value, "ClassType should be based on ref_counted");
public:
class_(const char* name)
{
« no previous file with comments | « compiled/StringMap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld