Update compiler version list in the README
This commit is contained in:
		| @@ -16,7 +16,7 @@ Tanya extends Phobos functionality and provides alternative implementations for | |||||||
| data structures and utilities that depend on the Garbage Collector in Phobos. | data structures and utilities that depend on the Garbage Collector in Phobos. | ||||||
|  |  | ||||||
| * [Bug tracker](https://issues.caraus.io/projects/tanya/issues) | * [Bug tracker](https://issues.caraus.io/projects/tanya/issues) | ||||||
| * [Documentation](https://docs.caraus.io/tanya) | * [API Documentation](https://docs.caraus.io/tanya) | ||||||
| * [Contribution guidelines](CONTRIBUTING.md) | * [Contribution guidelines](CONTRIBUTING.md) | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -141,6 +141,7 @@ There are more containers in the `tanya.container` package. | |||||||
|  |  | ||||||
| | dmd     | | | dmd     | | ||||||
| |:-------:| | |:-------:| | ||||||
|  | | 2.076.0 | | ||||||
| | 2.075.1 | | | 2.075.1 | | ||||||
| | 2.074.1 | | | 2.074.1 | | ||||||
| | 2.073.2 | | | 2.073.2 | | ||||||
|   | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -414,7 +414,8 @@ version (TanyaPhobos) | |||||||
|                                hasElaborateCopyConstructor, |                                hasElaborateCopyConstructor, | ||||||
|                                hasElaborateAssign, |                                hasElaborateAssign, | ||||||
|                                EnumMembers, |                                EnumMembers, | ||||||
|                                classInstanceAlignment; |                                classInstanceAlignment, | ||||||
|  |                                ifTestable; | ||||||
| } | } | ||||||
| else: | else: | ||||||
|  |  | ||||||
| @@ -2685,3 +2686,44 @@ pure nothrow @safe @nogc unittest | |||||||
|     } |     } | ||||||
|     static assert(classInstanceAlignment!C2 == S.alignof); |     static assert(classInstanceAlignment!C2 == S.alignof); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Tests whether $(D_INLINECODE pred(T)) can be used as condition in an | ||||||
|  |  * $(D_KEYWORD if)-statement or a ternary operator. | ||||||
|  |  * | ||||||
|  |  * $(D_PARAM pred) is an optional parameter. By default $(D_PSYMBOL ifTestable) | ||||||
|  |  * tests whether $(D_PARAM T) itself is usable as condition in an | ||||||
|  |  * $(D_KEYWORD if)-statement or a ternary operator, i.e. if it a value of type | ||||||
|  |  * $(D_PARAM T) can be converted to a boolean. | ||||||
|  |  * | ||||||
|  |  * Params: | ||||||
|  |  *  T    = A type. | ||||||
|  |  *  pred = Function with one argument. | ||||||
|  |  * | ||||||
|  |  * Returns: $(D_KEYWORD true) if $(D_INLINECODE pred(T)) can be used as | ||||||
|  |  *          condition in an $(D_KEYWORD if)-statement or a ternary operator. | ||||||
|  |  */ | ||||||
|  | template ifTestable(T, alias pred = a => a) | ||||||
|  | { | ||||||
|  |     enum bool ifTestable = is(typeof(pred(T.init) ? true : false)); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /// | ||||||
|  | pure nothrow @safe @nogc unittest | ||||||
|  | { | ||||||
|  |     static assert(ifTestable!int); | ||||||
|  |  | ||||||
|  |     struct S1 | ||||||
|  |     { | ||||||
|  |     } | ||||||
|  |     static assert(!ifTestable!S1); | ||||||
|  |  | ||||||
|  |     struct S2 | ||||||
|  |     { | ||||||
|  |         bool opCast(T : bool)() | ||||||
|  |         { | ||||||
|  |             return true; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     static assert(ifTestable!S2); | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user