diff options
author | 2017-02-16 12:20:35 +1100 | |
---|---|---|
committer | 2017-02-16 12:20:35 +1100 | |
commit | fb087b6c9231b272cb48d6004c7984eebaf5d24f (patch) | |
tree | 14c2df6b2e3f696d11d72b32ae475cc4278071db /src/lib/util/coretmpl.h | |
parent | 6ed0bad7f8a2bea7299ab1a8c8908f55b3accebd (diff) |
Cherry-pick some features from self-registering drivers PoC:
* Use size_t for sizes and <algorithm> for algorithms
* Fix up some files that were getting linked into multiple libs
* Add missing virtual method to sh2 peripheral class
* Put shortname in driver struct for locality
* Use shared pointers in config LRU cache for safety
Diffstat (limited to 'src/lib/util/coretmpl.h')
-rw-r--r-- | src/lib/util/coretmpl.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h index 0633a10c06e..011fb28264b 100644 --- a/src/lib/util/coretmpl.h +++ b/src/lib/util/coretmpl.h @@ -634,9 +634,8 @@ public: return std::pair<iterator, bool>(inserted, true); } template <typename P> - std::pair<iterator, bool> insert(P &&value) + std::enable_if_t<std::is_constructible<value_type, P>::value, std::pair<iterator, bool> > insert(P &&value) { - // FIXME: should only participate in overload resolution if std::is_constructible<value_type, P&&>::value return emplace(std::forward<P>(value)); } template <typename InputIt> |