我有一堆非常长的文件名导致我的HTML格式溢出.所有这些文件名都使用下划线而不是空格,并且如果它们是空格则会轻易打破/包装.像这样.
Here_is_an_example_of_a_really_long_filename_that_uses_underscores_instead_of_spaces.pdf
有没有办法告诉CSS在文本中处理下划线,好像它们是空格或连字符,因此也可以在下划线上包装/中断?像这样.
Here_is_an_example_of_a_really_long_
file_name_that_uses_underscores_
instead_of_spaces.pdf
出于我的目的,我不能使用脚本来执行此操作.我也不想使用word-wrap:break-word技巧,因为如果没有指定宽度通常也不行.而且,它在单词的中间任意打破.
谢谢.
VS2010
我有一个unique_ptr内部结构.然后,我有一个vector这种结构.如果我尝试调整向量(或使用reserve),我会收到编译错误.下面是一个精简的例子,仍然存在问题.
struct Test
{
unique_ptr<int> pValue;
};
void test()
{
// this doesn't compile
vector<Test> testVector;
testVector.resize(5);
// this also doesn't compile
testVector.reserve(5);
// this, of course, compiles
vector<unique_ptr<int>> testVector2;
testVector2.resize(5);
testVector2.reserve(5);
}
Run Code Online (Sandbox Code Playgroud)
我得到的错误是关于访问unique_ptr(赋值运算符)的私有成员的投诉.编译器正在尝试动态构造Test &Test::operator =(const Test &)和Test::Test(const Test &).我不明白为什么调整大小操作需要调用这些函数中的任何一个(为什么不调用默认构造函数,如果它需要?).他们都存在问题,因为它是不可能使要么unique_ptr因const.