#include <algorithm>
#include <functional>
#include <iostream>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
struct field
{
template<typename TDataType, typename = typename
std::enable_if< std::is_fundamental<TDataType>::value &&
std::is_same<TDataType, std::nullptr_t>::value == false &&
std::is_same<TDataType, void>::value == false>::type>
void set_data(TDataType data, size_t index = 0)
{
std::cout << "Fundamental\n";
}
template<typename TDataType, typename = void, typename = typename
std::enable_if< std::is_same<std::string, TDataType>::value ||
std::is_same<char const *, TDataType>::value>::type>
void set_data(TDataType data, size_t index = 0)
{
std::cout << "String\n";
}
};
int main()
{
field f;
f.set_data("abc");
f.set_data(7);
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGZ1bmN0aW9uYWw+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPG1lbW9yeT4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHR5cGVfdHJhaXRzPgojaW5jbHVkZSA8dXRpbGl0eT4KCgpzdHJ1Y3QgZmllbGQKewogICAgdGVtcGxhdGU8dHlwZW5hbWUgVERhdGFUeXBlLCB0eXBlbmFtZSA9IHR5cGVuYW1lCiAgICAgICAgICAgIHN0ZDo6ZW5hYmxlX2lmPCBzdGQ6OmlzX2Z1bmRhbWVudGFsPFREYXRhVHlwZT46OnZhbHVlICYmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OmlzX3NhbWU8VERhdGFUeXBlLCBzdGQ6Om51bGxwdHJfdD46OnZhbHVlID09IGZhbHNlICYmCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OmlzX3NhbWU8VERhdGFUeXBlLCB2b2lkPjo6dmFsdWUgPT0gZmFsc2U+Ojp0eXBlPgogICAgdm9pZCBzZXRfZGF0YShURGF0YVR5cGUgZGF0YSwgc2l6ZV90IGluZGV4ID0gMCkKICAgIHsKICAgIAlzdGQ6OmNvdXQgPDwgIkZ1bmRhbWVudGFsXG4iOwogICAgfQoKICAgI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