Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[FIX] Remove __cpp_nontype_template_parameter_class
The correct version would have been __cpp_nontype_template_args >= 201911L. All supported compilers fulfil this.
  • Loading branch information
eseiler committed Sep 28, 2023
commit 909247c55be9d7141946a99566f9456d6343d529
13 changes: 0 additions & 13 deletions include/seqan3/io/sam_file/sam_tag_dictionary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,9 @@ inline namespace literals
* The purpose of those tags is to fill or query the seqan3::sam_tag_dictionary for a specific key (tag_id) and
* retrieve the corresponding value.
*/

#ifdef __cpp_nontype_template_parameter_class
template <small_string<2> str> // TODO: better handling if too large string is provided?
constexpr uint16_t operator""_tag()
{
#else // GCC/Clang extension
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wpedantic"
template <typename char_t, char_t... s>
constexpr uint16_t operator""_tag()
{
static_assert(std::same_as<char_t, char>, "Illegal SAM tag: Type must be char.");
constexpr small_string<sizeof...(s)> str{std::array<char, sizeof...(s)>{s...}};
# pragma GCC diagnostic pop
#endif

static_assert(str.size() == 2, "Illegal SAM tag: Exactly two characters must be given.");

constexpr char char0 = str[0];
Expand Down