c++ - Should main with trailing return type be avoided? -
in code example below main
function written c++11 trailing return type notation:
auto main() -> int { //... return 0; }
question:
are there reasons main
trailing return type should avoided , classical notation should preferred?
it's valid , works fine.
the issue concern is new. may confuse or surprise readers of code familiar c++98.
but works, feel free write main
way if feel it.
Comments
Post a Comment