Changeset 403
- Timestamp:
- 10/14/07 23:02:31 (1 year ago)
- Files:
-
- candidate/phobos/std/stdio.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
candidate/phobos/std/stdio.d
r399 r403 337 337 { 338 338 FileWriter!(char) w; 339 static const errorMessage = 340 "You must pass a formatting string as the first" 341 " argument to writef. If no formatting is needed," 342 " you may want to use write."; 339 343 static if (!is(typeof(args[0]) : FILE*)) 340 344 { 345 static assert(isSomeString!(T[0]), errorMessage); 341 346 w.backend = stdout; 342 347 FLOCK(w.backend); … … 346 351 else 347 352 { 353 static assert(isSomeString!(T[1]), errorMessage); 348 354 w.backend = args[0]; 349 355 FLOCK(w.backend); … … 380 386 // Duplicate code so we don't duplicate the stack; replace with macro l8r 381 387 FileWriter!(char) w; 388 static const errorMessage = 389 "You must pass a formatting string as the first" 390 " argument to writefln. If no formatting is needed," 391 " you may want to use writeln."; 382 392 static if (!is(typeof(args[0]) : FILE*)) 383 393 { 394 static assert(isSomeString!(T[0]), errorMessage); 384 395 w.backend = stdout; 385 396 FLOCK(w.backend); … … 389 400 else 390 401 { 402 static assert(isSomeString!(T[1]), errorMessage); 391 403 w.backend = args[0]; 392 404 FLOCK(w.backend);
