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

Unified Diff: compiled/intrusive_ptr.h

Issue 29713594: #Too long, see below (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created March 2, 2018, 3:40 p.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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/intrusive_ptr.h
diff --git a/compiled/intrusive_ptr.h b/compiled/intrusive_ptr.h
index a198fc3e1d1adcd1c442bf0e8f4b769b0d8d1e5b..d09d768b50a3e0df14b4b8c20b31ae4a859ba5da 100644
--- a/compiled/intrusive_ptr.h
+++ b/compiled/intrusive_ptr.h
@@ -64,10 +64,10 @@ private:
int mRefCount;
};
-template<typename T,
- class = typename std::enable_if<std::is_base_of<ref_counted,T>::value>::type>
+template<typename T>
class intrusive_ptr
{
+ static_assert(std::is_base_of<ref_counted, T>::value, "The class T should inherit ref_counted");
public:
explicit intrusive_ptr()
: mPointer(nullptr)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld