@@ -3258,14 +3258,20 @@ struct LockingTextReader
32583258}
32593259
32603260/**
3261- * Indicates whether $(D T) is a file handle of some kind.
3261+ * Indicates whether $(D T) is a file handle, i.e. the type
3262+ * is implicitly convertable to $(LREF File) or a pointer to a
3263+ * $(REF FILE, core,stdc,stdio).
3264+ *
3265+ * Returns:
3266+ * `true` if `T` is a file handle, `false` otherwise.
32623267 */
32633268template isFileHandle (T)
32643269{
32653270 enum isFileHandle = is (T : FILE * ) ||
32663271 is (T : File );
32673272}
32683273
3274+ // /
32693275@safe unittest
32703276{
32713277 static assert (isFileHandle! (FILE * ));
@@ -3275,14 +3281,20 @@ template isFileHandle(T)
32753281/**
32763282 * Property used by writeln/etc. so it can infer @safe since stdout is __gshared
32773283 */
3278- private @property File trustedStdout() @trusted { return stdout; }
3284+ private @property File trustedStdout() @trusted
3285+ {
3286+ return stdout;
3287+ }
32793288
32803289/* **********************************
32813290For each argument $(D arg) in $(D args), format the argument (as per
32823291$(LINK2 std_conv.html, to!(string)(arg))) and write the resulting
32833292string to $(D args[0]). A call without any arguments will fail to
32843293compile.
32853294
3295+ Params:
3296+ args = the items to write to `stdout`
3297+
32863298Throws: In case of an I/O error, throws an $(D StdioException).
32873299 */
32883300void write (T... )(T args) if (! is (T[0 ] : File ))
@@ -3307,9 +3319,15 @@ void write(T...)(T args) if (!is(T[0] : File))
33073319}
33083320
33093321/* **********************************
3310- * Equivalent to $(D write(args, '\n')) . Calling $(D writeln) without
3322+ * Equivalent to ` write(args, '\n')` . Calling ` writeln` without
33113323 * arguments is valid and just prints a newline to the standard
33123324 * output.
3325+ *
3326+ * Params:
3327+ * args = the items to write to `stdout`
3328+ *
3329+ * Throws:
3330+ * In case of an I/O error, throws an $(LREF StdioException).
33133331 */
33143332void writeln (T... )(T args)
33153333{
0 commit comments