开发者

How to format identation for stream operators in Eclipse?

I'd like to auto-format the stream operator in Eclipse in the following way:

std::cout << "Creating a cache entry for initial data for staff = "
          << std::endl;

nmspace::myspecialstream << "Some text is printed here."
                         << nmspace::endl; 

Essentially, I'd like the stream operator to align on the next line with the first stream operator on the previous line. There is a way to do similar formatting for function arguments where function arguments are aligned on each line with the first the argument, consider example:

void Manager::func(nmspace::SomeVeryLongType::SomeTypeWithinThatLongType开发者_StackOverflow arg1,
                   int arg2);

Wondering if that is possible to do it for streams as well?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜