--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAA3nRahb05GgWnat%2Bz9-pvn7d%3DmofRxL-NmrpaQz-0sTUDuZhQ%40mail.gmail.com.
I can confirm that some compilers will instantiate two or more strings.
In a couple of recent reviews* now, I've seen these patterns:foo.h---class Foo {public:static constexpr char kSomeString[] = "Some string";static constexpr const char* kSomeOtherString = "Some other string";// etc.};foo.cc---constexpr char Foo:kSomeString[];constexpr const char* Foo:kSomeOtherString;// etc.
Is this pattern encouraged within Chromium? To me, it looks really odd to inline the string value in the header, and makes me wonder whether the string is going to potentially be compiled in multiple times across different compilation units. Am I just behind the times?Also, am I right to think that we prefer the array-style type "constexpr char[]" over the pointer-style type "constexpr const char*"?
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAFJcur9O1r%2Bx1byQX-GJ65i1MwdkU%3DrbfYyWoyCQ7gMKUFr8ZQ%40mail.gmail.com.