#include namespace sqlpp { template struct char_sequence { }; template struct make_char_sequence_impl; template struct make_char_sequence_impl> { using type = char_sequence; }; template using make_char_sequence = typename make_char_sequence_impl< sizeof(Input), Input, std::make_index_sequence>::type; } // Use directly struct A { static constexpr const char _literal[] = "delta"; using name_t = sqlpp::make_char_sequence; }; static_assert( std::is_same>::value, ""); // Use macro #define SQLPP_ALIAS_PROVIDER(name) \ struct name##_t \ { \ static constexpr const char _literal[] = #name; \ using _alias_t = sqlpp::make_char_sequence; \ }; SQLPP_ALIAS_PROVIDER(hello); int main() { static_assert( std::is_same>::value, ""); }