-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Remove unused callback traits"
This reverts commit b83d9c6.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* This software is distributed under BSD 3-clause license (see LICENSE file). | ||
* | ||
* Copyright (c) 2012-2013 Sergey Lisitsyn | ||
*/ | ||
#pragma once | ||
|
||
namespace tapkee | ||
{ | ||
|
||
template <class Callback> struct BatchCallbackTraits | ||
{ | ||
static const bool supports_batch; | ||
}; | ||
#define TAPKEE_CALLBACK_SUPPORTS_BATCH(X) template <> const bool BatchCallbackTraits<X>::supports_batch = true; | ||
|
||
template <class T> class is_dummy | ||
{ | ||
typedef char yes; | ||
typedef long no; | ||
|
||
template <typename C> static yes dummy(typename C::dummy*); | ||
template <typename C> static no dummy(...); | ||
|
||
public: | ||
static const bool value = (sizeof(dummy<T>(0)) == sizeof(yes)); | ||
}; | ||
|
||
} // namespace tapkee |