diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc index d3f553caac8f9f..bb637d3a77f6fa 100644 --- a/src/inspector/main_thread_interface.cc +++ b/src/inspector/main_thread_interface.cc @@ -5,6 +5,7 @@ #include #include +#include "util-inl.h" namespace node { namespace inspector { diff --git a/src/util-inl.h b/src/util-inl.h index 9751f9babe1189..acd370e2358264 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -160,8 +160,8 @@ ContainerOfHelper::operator TypeName*() const { } template -inline ContainerOfHelper ContainerOf(Inner Outer::*field, - Inner* pointer) { +constexpr ContainerOfHelper ContainerOf(Inner Outer::*field, + Inner* pointer) { return ContainerOfHelper(field, pointer); } diff --git a/src/util.h b/src/util.h index f0d3189d1af2f2..086e33933e6b5a 100644 --- a/src/util.h +++ b/src/util.h @@ -198,8 +198,8 @@ class ContainerOfHelper { // Calculate the address of the outer (i.e. embedding) struct from // the interior pointer to a data member. template -inline ContainerOfHelper ContainerOf(Inner Outer::*field, - Inner* pointer); +constexpr ContainerOfHelper ContainerOf(Inner Outer::*field, + Inner* pointer); // Convenience wrapper around v8::String::NewFromOneByte(). inline v8::Local OneByteString(v8::Isolate* isolate,