summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-13 20:16:25 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-14 19:06:40 +0200
commit9a61a134669c2240100fd1ccadaf974f86fe4655 (patch)
tree23c21decc6af6f86a2e437e4eb65ee9e4c9a9463 /meson.build
parent055335bf49dbcb8c149bdcd4e96004c68e6b6ece (diff)
meson.build: Switch to C++14
C++14 is a minor release that doesn't introduce major new concepts or paradigms compared to C++11, but brings two useful changes for us: - std::make_unique allows dropping our custom implementation in utils. - Functions returning constexpr are not assumed to be const anymore, which is needed to create a standard-conformant span implementation. All the g++ and clang++ versions we support and test (g++-5 onwards and clang++6 onwards) support C++14. However, due to a defect in the original C++14 specification, solved in N4387 ([1]), compilation would fail on g++-5 due to the use of std::map::emplace() with a non-copyable value type. It turns out we can easily fix it by switching to the explicit piecewise emplace() overload. There is thus really nothing holding back the switch. Let's do it, and update the coding style accordingly. [1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4387 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 63448858..37cf4d66 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,7 @@ project('libcamera', 'c', 'cpp',
default_options : [
'werror=true',
'warning_level=2',
- 'cpp_std=c++11',
+ 'cpp_std=c++14',
],
license : 'LGPL 2.1+')