Commit 1f7a7b32 authored by thakis's avatar thakis Committed by Commit bot

Fix C++ violation.

gcc rejects the following snippet, clang rejects it in -std=c++11 mode:
  namespace A { template<class T> class C {}; }
  namespace B { template class A::C<int>; }

Indeed, the C++ standard says in 14.7.2p2 "An explicit instantiation shall
appear in an enclosing namespace of its template", so cl.exe is incorrect to
allow this.

Just move the instantiation out of the v8 namespace to fix.  No intended
behavior change.  Fixes building with clang-cl on Windows.

BUG=chromium:475643
LOG=N
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/1073903002

Cr-Commit-Position: refs/heads/master@{#27721}
parent 48eff34c
......@@ -24,11 +24,13 @@ struct CpuProfileDeoptFrame {
size_t position;
};
} // namespace v8
#ifdef V8_OS_WIN
template class V8_EXPORT std::vector<CpuProfileDeoptFrame>;
template class V8_EXPORT std::vector<v8::CpuProfileDeoptFrame>;
#endif
namespace v8 {
struct V8_EXPORT CpuProfileDeoptInfo {
/** A pointer to a static string owned by v8. */
......@@ -36,11 +38,13 @@ struct V8_EXPORT CpuProfileDeoptInfo {
std::vector<CpuProfileDeoptFrame> stack;
};
} // namespace v8
#ifdef V8_OS_WIN
template class V8_EXPORT std::vector<CpuProfileDeoptInfo>;
template class V8_EXPORT std::vector<v8::CpuProfileDeoptInfo>;
#endif
namespace v8 {
/**
* CpuProfileNode represents a node in a call graph.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment