Skip to content

Commit

Permalink
Allow kernel cache to compile with gcc 4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ddemidov committed Sep 13, 2013
1 parent 620217f commit d192b89
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vexcl/operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1878,25 +1878,25 @@ template <bool dummy>
std::deque<kernel_cache*> cache_register<dummy>::caches;

struct kernel_cache {
std::map<cl_context, kernel_cache_entry> store;
typedef std::map<cl_context, kernel_cache_entry> store_type;

store_type store;

kernel_cache() {
cache_register<>::add(this);
}

template <typename T>
auto insert(T&& item) -> decltype( store.insert( std::forward<T>(item) ) )
{
std::pair<store_type::iterator, bool> insert(T&& item) {
return store.insert(std::forward<T>(item));
}

auto end() const -> decltype( store.end() ) {
store_type::const_iterator end() const {
return store.end();
}

template <typename T>
auto find(T&& key) -> decltype( store.find( std::forward<T>(key) ) )
{
store_type::iterator find(T&& key) {
return store.find( std::forward<T>(key) );
}

Expand Down

0 comments on commit d192b89

Please sign in to comment.