C++11 Feature Proposal: static_assert

260 views
Skip to first unread message

Peter Kasting

unread,
Sep 24, 2014, 8:00:58 PM9/24/14
to Chromium-dev
What: static_assert() tests its argument at compile time.
Why: We provide this via macros like COMPILE_ASSERT that are (now) just wrappers around static_assert() anyway.  Let's simply replace the wrappers with the real thing.

v8/src/base/macros.h also implies that static_assert()'s errors are easier to read than the hand-rolled version it still has sitting around as an alternative, so if there are places that aren't implemented using static_assert() yet, we should definitely change them.

PK

Antoine Labour

unread,
Sep 24, 2014, 8:04:33 PM9/24/14
to Peter Kasting, Chromium-dev
+1, no-brainer.

Antoine 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

James Robinson

unread,
Sep 24, 2014, 8:25:12 PM9/24/14
to Peter Kasting, Chromium-dev
Sure, let's do it.

On Wed, Sep 24, 2014 at 5:00 PM, 'Peter Kasting' via Chromium-dev <chromi...@chromium.org> wrote:

--

Nico Weber

unread,
Sep 25, 2014, 3:15:15 PM9/25/14
to James Robinson, Peter Kasting, Chromium-dev
This is now in the "allowed" list: http://chromium-cpp.appspot.com/
Reply all
Reply to author
Forward
0 new messages