本文整理汇总了C++中std::initializer_list::end方法的典型用法代码示例。如果您正苦于以下问题:C++ initializer_list::end方法的具体用法?C++ initializer_list::end怎么用?C++ initializer_list::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::initializer_list
的用法示例。
在下文中一共展示了initializer_list::end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: multi_polygon
/// \constructor_initializer_list{multi_polygon}
inline multi_polygon(std::initializer_list<Polygon> l)
: base_type(l.begin(), l.end())
{}
示例2: pool
linear_vector(std::initializer_list<T> list) : pool(nullptr), poolsize(0), objectsize(0) {
for(const T *p = list.begin(); p != list.end(); ++p) append(*p);
}
示例3: operator
Polynomial PolyDomain::operator()(const std::initializer_list<FieldElement>& c) const {
return makeElement(std::vector<FieldElement>(c.begin(), c.end()));
}
示例4: multi_point
/// \constructor_initializer_list{multi_point}
inline multi_point(std::initializer_list<Point> l)
: base_type(l.begin(), l.end())
{}
示例5: AddRange
static void AddRange(TCollection &collection, std::initializer_list<TItem> initializerList)
{
collection.insert(collection.end(), initializerList.begin(), initializerList.end());
}
示例6: out_of_range
myarray(std::initializer_list<T> list): std::array<T,Size>()
{
if(list.size()!=Size)
throw std::out_of_range("wrong number of values in initializer list");
std::copy(list.begin(), list.end(), this->begin());
}
示例7: StarMap
StarMap::StarMap(const std::initializer_list<Star>& l) :
StarMap(l.begin(), l.end())
{
}
示例8: vector
vector(std::initializer_list<double> values)
: my_size(values.size()), data(new double[my_size])
{
std::copy(values.begin(), values.end(), data);
std::cout << "Init constructor called.\n";
}
示例9: add
IndType add(std::initializer_list<T> neigs)
{
return add(neigs.begin(), neigs.end());
}
示例10: Vector
Vector(std::initializer_list<double> lst): elem{new double[lst.size()]}, sz(lst.size()) { std::copy(lst.begin(), lst.end(), elem); }
示例11: AbstractColorGradient
ExplicitEquidistantColorGradient::ExplicitEquidistantColorGradient(const std::string & name, bool discrete, std::initializer_list<reflectionzeug::Color> colors)
: AbstractColorGradient(name)
, m_colors(colors.begin(), colors.end())
, m_discrete(discrete)
{
}
示例12:
str_vec::str_vec(const std::initializer_list<std::string> &s)
{
auto r = alloc_n_copy((std::string *)s.begin(),(std::string *)s.end());
elements = r.first;
cap = first_free = r.second;
}
示例13: polygon
/// \constructor_initializer_list{polygon}
inline polygon(std::initializer_list<ring_type> l)
: m_outer(l.size() > 0 ? *l.begin() : ring_type())
, m_inners(l.size() > 0 ? l.begin() + 1 : l.begin(), l.end())
{}
示例14:
StrVec::StrVec(std::initializer_list<std::string> il)
{
auto newdata = alloc_n_copy(il.begin(), il.end());
elements = newdata.first;
first_free = cap = newdata.second;
}
示例15:
RadialTerrain(std::initializer_list<Zone> T) :
_terrains(T.begin(), T.end())
{
}