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

Unified Diff: compiled/StringMap.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 | « no previous file | compiled/bindings/generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/StringMap.h
diff --git a/compiled/StringMap.h b/compiled/StringMap.h
index 1b09b0dd343ce326780d979ee735f49fdd1fc99b..37b01a20de1e62fd58f307c2805e548233545cba 100644
--- a/compiled/StringMap.h
+++ b/compiled/StringMap.h
@@ -46,10 +46,10 @@ struct StringHash
namespace StringMap_internal
{
- template<typename Key,
- class = typename std::enable_if<std::is_base_of<String, Key>::value>::type>
+ template<typename Key>
struct StringSetEntry
{
+ static_assert(std::is_base_of<String, Key>::value, "Type of Key should be based on String");
typedef Key key_type;
typedef const String& key_type_cref;
typedef size_t size_type;
« no previous file with comments | « no previous file | compiled/bindings/generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld