From 27b290d6dff14fdb7717d414fb941aca0fd2dc55 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 30 May 2018 14:24:59 +0530 Subject: Add check_header to Reference manual and release notes [skip ci] --- docs/markdown/snippets/compiler_check_header.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/markdown/snippets/compiler_check_header.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/compiler_check_header.md b/docs/markdown/snippets/compiler_check_header.md new file mode 100644 index 0000000..8981d13 --- /dev/null +++ b/docs/markdown/snippets/compiler_check_header.md @@ -0,0 +1,12 @@ +## New compiler check: check_header() + +The existing compiler check `has_header()` only checks if the header exists, +either with the `__has_include` C++11 builtin, or by running the pre-processor. + +However, sometimes the header you are looking for is unusable on some platforms +or with some compilers in a way that is only detectable at compile-time. For +such cases, you should use `check_header()` which will include the header and +run a full compile. + +Note that `has_header()` is much faster than `check_header()`, so it should be +used whenever possible. -- cgit v1.1