geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (GEODE-3420) Remove all .inl files
Date Thu, 09 Nov 2017 19:27:10 GMT


ASF GitHub Bot commented on GEODE-3420:

dgkimura commented on a change in pull request #143: GEODE-3420: Remove inline header files

 File path: cppcache/include/geode/Cacheable.hpp
 @@ -35,10 +35,10 @@ typedef SerializablePtr CacheablePtr;
 typedef Serializable Cacheable;
 template <typename TVALUE>
-inline CacheablePtr createValue(const std::shared_ptr<TVALUE>& value);
+inline CacheablePtr createValue(const std::shared_ptr<TVALUE>& value) {
 Review comment:
   Okay, I gave it a quick try.  Region header has some interesting template type resolutions.
 I can do some type trait magic, but I'm not sure it's worth it.
   Here's unchanged Region signatures:
       void put(const CacheableKeyPtr& key, const CacheablePtr& value...)
       template <class KEYTYPE, class VALUETYPE>
       void put(const KEYTYPE& key, const VALUETYPE& value... )
   If we call `region.put(a_key, CacheableString::create("foobar"), ...)` this matches templated
put, which uses createValue template to reinterpret CacheableStringPtr into CacheablePtr.
 Ideally, it seems like instead we'd want the call to match the non-templated signature. 
In order to do that I can change the signatures to something like follows:
       template <class KEYTYPE, class VALUETYPE>
       inline void put(
         const typename std::enable_if<is_integral_or_char_ptr<KEYTYPE>::value>::type&
key = 0,
         const typename std::enable_if<is_integral_or_char_ptr<VALUETYPE>::value>::type&
value = 0,
         const SerializablePtr& arg = nullptr) {
   And then we'd have to implement `is_integral_or_char_ptr`, which should be trivial.  Is
this worth it?  Did I miss something?

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Remove all .inl files
> ---------------------
>                 Key: GEODE-3420
>                 URL:
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Addison
> Remove all .inc files in favor of a more readable format to describe includes and templates.

This message was sent by Atlassian JIRA

View raw message