如何从输出迭代器中删除类型std::insert_iterator和std::back_insert_iterator?是否可以使用boost any_iterator来这样做?
#include <boost/range.hpp>
#include <boost/range/detail/any_iterator.hpp>
#include <vector>
typedef boost::range_detail::any_iterator<
int, boost::incrementable_traversal_tag, int &, std::ptrdiff_t > It;
int main()
{
std::vector<int> v;
It outIt( v.begin() ); // compiles
It inserter( std::back_inserter(v) ); // does not compile
return 0;
}
Run Code Online (Sandbox Code Playgroud) 如何在我的测试用例中对齐input和select表单元素,以便它们的水平边框对齐,包括标签在内的所有文本都与基线对齐?
我想有一个label和input表单元素与另一起label和select表单元素一行.因此,我希望水平边框select和input元素对齐,我还希望所有文本都包含与基线对齐的标签.可能吗?
我无法在Win8上的IE8或FF上实现它.我试图使用相同的盒子模型box-sizing:
border-box;强制input和select渲染.
查看我的测试用例,其中包含以下代码:
<form action="Submit" method="post">
<p>
<label>Sex<select><option value="" selected="selected">Sex</option></select></label>
<label>Date of Birth<input type="text" value="Date of Birth" /></label>
</p>
</form>
Run Code Online (Sandbox Code Playgroud)
body, input, select {
font-family: Helvetica,Arial,sans-serif;
font-size: 12px;
}
select, input {
height: 20px;
padding: 0;
margin: 0;
border: 1px solid gray;
box-sizing: border-box;
-moz-box-sizing: border-box; …Run Code Online (Sandbox Code Playgroud)