Skip to content

Commit

Permalink
Fix isStringable
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Oct 9, 2024
1 parent 2476aa5 commit ad0e8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/numem/string.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import numem.core;
import std.string;
import std.traits;
import core.stdcpp.string;
import std.traits : Unqual;
import std.traits : Unqual, hasFunctionAttributes;

/// Gets whether the provided type is some type of string.
enum isSomeString(T) =
Expand Down Expand Up @@ -48,7 +48,7 @@ enum isSomeChar(T) =
enum isStringable(T) =
__traits(hasMember, T, "toString") &&
isSomeString!(ReturnType!(T.toString)) &&
hasUDA(T.toString, nogc);
hasFunctionAttributes(T.toString, "@nogc");

/**
Gets the size of the element in a string-ish type in bytes.
Expand Down

0 comments on commit ad0e8f9

Please sign in to comment.