Skip to content

Commit

Permalink
Revert "Remove unused callback traits"
Browse files Browse the repository at this point in the history
This reverts commit b83d9c6.
  • Loading branch information
lisitsyn committed May 6, 2024
1 parent 4752993 commit 7e0f13e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions include/tapkee/traits/callbacks_traits.hpp
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

0 comments on commit 7e0f13e

Please sign in to comment.