Commit 96616ea9 authored by Robert Bradshaw's avatar Robert Bradshaw

Guard C++ declarations with a directive.

parent 4e07fc52
......@@ -1174,6 +1174,8 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
# templates [string] or None
def declare(self, env):
if self.visibility != 'extern' and not env.directives['experimental_cpp_class_def']:
error(self.pos, "C++ classes need to be declared extern unless experimental_cpp_class_def enabled")
if self.templates is None:
template_types = None
else:
......
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