From patchwork Fri Jan 18 13:08:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 272 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7499C60B21 for ; Fri, 18 Jan 2019 14:08:28 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 875CA53E; Fri, 18 Jan 2019 14:08:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547816907; bh=OOj6KAG732QihTkrUVvs6MhGvt3ktxZrf9xPiTMi7lI=; h=From:To:Cc:Subject:Date:From; b=REfdyUO9FR9THPza3Bt3xgN4gBU8mcX1Mf35XH87mwBxbycnxAcm+blsjjqDeextL oYNMUcYyywimjrGKmaFa7FsQYUWs8AbPlcKkCdx/5VOqkPeLdxMlNCQHtJRIR+VVTs 6sXir6xj1DHnoipwB3/VGx7PAG7mmcB4CBEW4G7A= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Jan 2019 15:08:23 +0200 Message-Id: <20190118130823.22541-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: utils: Don't use C++17 nested namespaces X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 13:08:28 -0000 Nesting namespace names in a single namespace declaration is a C++17 feature. As libcamera depends on C++11 only, nest two separate namespace declarations instead. Reported-by: Shik Chen Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/include/utils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libcamera/include/utils.h b/src/libcamera/include/utils.h index a2e450b35372..73fa2e69b029 100644 --- a/src/libcamera/include/utils.h +++ b/src/libcamera/include/utils.h @@ -11,7 +11,9 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -namespace libcamera::utils { +namespace libcamera { + +namespace utils { /* C++11 doesn't provide std::make_unique */ template @@ -20,6 +22,8 @@ std::unique_ptr make_unique(Args&&... args) return std::unique_ptr(new T(std::forward(args)...)); } -} /* namespace libcamera::utils */ +} /* namespace utils */ + +} /* namespace libcamera */ #endif /* __LIBCAMERA_UTILS_H__ */