senf::ListParser<ListPolicy>::front()
const
{
- SENF_ASSERT( ! empty() );
+ SENF_ASSERT( ! empty(), "front() called on empty list" );
container c(*this);
return *(c.begin());
}
template <class ListPolicy>
template <class Value>
-prefix_ void senf::ListParser<ListPolicy>::push_back(Value value, size_type n)
+prefix_ void senf::ListParser<ListPolicy>::push_back(Value const & value, size_type n)
const
{
container c(*this);
}
template <class ListPolicy>
-prefix_ void senf::ListParser<ListPolicy>::push_back_space(size_type n)
+prefix_ typename senf::ListParser<ListPolicy>::value_type
+senf::ListParser<ListPolicy>::push_back_space(size_type n)
const
{
container c(*this);
- c.push_back_space(n);
+ return c.push_back_space(n);
}
template <class ListPolicy>
template <class Value>
-prefix_ void senf::ListParser<ListPolicy>::push_front(Value value, size_type n)
+prefix_ void senf::ListParser<ListPolicy>::push_front(Value const & value, size_type n)
const
{
container c(*this);
}
template <class ListPolicy>
-prefix_ void senf::ListParser<ListPolicy>::push_front_space(size_type n)
+prefix_ typename senf::ListParser<ListPolicy>::value_type
+senf::ListParser<ListPolicy>::push_front_space(size_type n)
const
{
container c(*this);
- c.push_front_space(n);
+ return c.push_front_space(n);
}
template <class ListPolicy>
senf::ListParser_Container<ListPolicy>::front()
const
{
- SENF_ASSERT( ! empty() );
+ SENF_ASSERT( ! empty(), "front() called on empty list" );
return *begin();
}
template <class ListPolicy>
template <class Value>
-prefix_ void senf::ListParser_Container<ListPolicy>::push_back(Value value,
+prefix_ void senf::ListParser_Container<ListPolicy>::push_back(Value const & value,
size_type n)
{
insert(end(),n,value);
}
template <class ListPolicy>
-prefix_ void senf::ListParser_Container<ListPolicy>::push_back_space(size_type n)
+prefix_ typename senf::ListParser_Container<ListPolicy>::value_type
+senf::ListParser_Container<ListPolicy>::push_back_space(size_type n)
{
- shift(end(),n);
+ return shift(end(),n);
}
template <class ListPolicy>
template <class Value>
-prefix_ void senf::ListParser_Container<ListPolicy>::push_front(Value value,
+prefix_ void senf::ListParser_Container<ListPolicy>::push_front(Value const & value,
size_type n)
{
insert(begin(),n,value);
}
template <class ListPolicy>
-prefix_ void senf::ListParser_Container<ListPolicy>::push_front_space(size_type n)
+prefix_ typename senf::ListParser_Container<ListPolicy>::value_type
+senf::ListParser_Container<ListPolicy>::push_front_space(size_type n)
{
- shift(begin(),n);
+ return shift(begin(),n);
}
// Parser interface