<commit_before>#ifndef CONFIG_MANAGER_DETAIL_H
#define CONFIG_MANAGER_DETAIL_H

#include <log2plot/defines.h>
#ifdef WITH_VISP
#include <visp/vpHomogeneousMatrix.h>
#endif

namespace log2plot
{
namespace detail {

#ifdef WITH_VISP

  // have to use SFINAE to prevent all derived of vpArray from using default method
  // just assume a vpArray2D has ::loadYAML
  template <typename T>
  class vpArrayDerived
  {
  private:
    typedef char YesType[1];
    typedef char NoType[2];

    template <typename C> static YesType& test(decltype(&C::loadYAML));
    template <typename C> static NoType& test(...);

  public:
    enum { value = sizeof(test<T>(nullptr)) == sizeof(YesType) };
  };

#endif // WITH_VISP

} // detail
} // log2plot


#endif // CONFIG_MANAGER_DETAIL_H<commit_msg>shorter sfinae<commit_after>#ifndef CONFIG_MANAGER_DETAIL_H
#define CONFIG_MANAGER_DETAIL_H

#include <log2plot/defines.h>
#ifdef WITH_VISP
#include <visp/vpHomogeneousMatrix.h>
#endif

namespace log2plot
{
namespace detail {

#ifdef WITH_VISP

// have to use SFINAE to prevent all derived of vpArray from using default method
// just assume a vpArray2D has .loadYAML
template <typename T>
struct vpArrayDerived
{
  template <typename C> static constexpr decltype(std::declval<C>().loadYAML, bool()) test(int /* unused */)
  {return true;}
  template <typename C> static constexpr bool test(...) {return false;}
  static constexpr bool value = test<T>(int());
};

#endif // WITH_VISP

} // detail
} // log2plot


#endif // CONFIG_MANAGER_DETAIL_H
{'fraction_non_alphanumeric': 0.1100196463654224, 'fraction_numerical': 0.006548788474132285, 'mean_word_length': 4.457142857142857, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6633283', 'n_tokens_mistral': 539, 'n_tokens_neox': 518, 'n_words': 145}