Fix template condition for Vector.insertBack
This commit is contained in:
parent
b6413823cd
commit
b8d5d4c2bd
@ -15,8 +15,9 @@ import core.exception;
|
|||||||
import std.algorithm.comparison;
|
import std.algorithm.comparison;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
import std.range.primitives;
|
import std.range.primitives;
|
||||||
|
import std.meta;
|
||||||
import std.traits;
|
import std.traits;
|
||||||
public import tanya.enums : IL;
|
public import tanya.meta.gen : IL;
|
||||||
import tanya.memory;
|
import tanya.memory;
|
||||||
|
|
||||||
version (unittest)
|
version (unittest)
|
||||||
@ -631,9 +632,6 @@ struct Vector(T)
|
|||||||
return toRemove;
|
return toRemove;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ditto.
|
|
||||||
alias remove = removeBack;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
unittest
|
unittest
|
||||||
{
|
{
|
||||||
@ -655,7 +653,7 @@ struct Vector(T)
|
|||||||
* Returns: The number of elements inserted.
|
* Returns: The number of elements inserted.
|
||||||
*/
|
*/
|
||||||
size_t insertBack(R...)(auto ref R el) @trusted
|
size_t insertBack(R...)(auto ref R el) @trusted
|
||||||
if (isImplicitlyConvertible!(R[0], T))
|
if (allSatisfy!(ApplyRight!(isImplicitlyConvertible, T), R))
|
||||||
{
|
{
|
||||||
reserve(length_ + el.length);
|
reserve(length_ + el.length);
|
||||||
if (capacity_ <= length_)
|
if (capacity_ <= length_)
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic enum templates.
|
* Templates that generate values.
|
||||||
*
|
*
|
||||||
* Copyright: Eugene Wissner 2016.
|
* Copyright: Eugene Wissner 2016.
|
||||||
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||||
* Mozilla Public License, v. 2.0).
|
* Mozilla Public License, v. 2.0).
|
||||||
* Authors: $(LINK2 mailto:belka@caraus.de, Eugene Wissner)
|
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||||
*/
|
*/
|
||||||
module tanya.enums;
|
module tanya.meta.gen;
|
||||||
|
|
||||||
import std.traits;
|
import std.traits;
|
||||||
|
|
15
source/tanya/meta/package.d
Normal file
15
source/tanya/meta/package.d
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metaprogramming.
|
||||||
|
*
|
||||||
|
* Copyright: Eugene Wissner 2016.
|
||||||
|
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
||||||
|
* Mozilla Public License, v. 2.0).
|
||||||
|
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
||||||
|
*/
|
||||||
|
module tanya.meta;
|
||||||
|
|
||||||
|
public import tanya.meta.gen;
|
Loading…
x
Reference in New Issue
Block a user