c++ namespace best practice dilemma

后端 未结 6 1989
遥遥无期
遥遥无期 2021-01-31 03:55

I\'m finding that what I\'ve considered \"best practice\" for use namespace in c++ is hurting the readability of my code, and making me question how to use them well.

My

6条回答
  •  梦毁少年i
    2021-01-31 04:10

    Personally? I'd get rid of the "myproject" part. What is the chance that your library will use the exact same namespace name as another and have a symbol defined with the same name as another?

    Also, I would suggest shorter names for namespaces you expect to be used in headers.

提交回复
热议问题