开发者

How to format identation for stream operators in Eclipse?

开发者 https://www.devze.com 2023-02-06 10:54 出处:网络
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 = \"

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

精彩评论

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

关注公众号