Skip to content

Commit

Permalink
Typos and some C++ code for screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwigpacifici committed May 27, 2016
1 parent 558a43a commit 6e44594
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can modify the following lists to recognize more words or set it to `nil` to
* `modern-c++-preprocessors` - `#define`, `__LINE__`, `__cplusplus`...
* `modern-c++-types` - `bool`, `char`, `double`...

Set to `t` to enable the following options or otherwise to `nil`:
Set to `t` (default value) to enable the following options or otherwise to `nil`:

* `modern-c++-literal-interger` - `0b101010`, `18446744073709550592LLU`, `0XdeadBABEu`...

Expand Down
26 changes: 26 additions & 0 deletions preview.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#define CONCATENATE_IMPL(s1, s2) s1##s2
#define CONCATENATE(s1, s2) CONCATENATE_IMPL(s1, s2)
#define ANONYMOUS_VARIABLE(str) CONCATENATE(str, __LINE__)

constexpr int pi = 314LLu;
thread_local decltype(pi) rage = 0b10;

[[deprecated("abc")]] char16_t *f() noexcept { return nullptr; }

static_assert(std::is_copy_constructible<T>::value, "Swap requires copying");

template <typename T> struct Foo {
static_assert(std::is_floating_point<T>::value,
"Foo<T>: T must be floating point");
};

struct A final : Foo {
A() = default;
[[noreturn]] virtual void foo() override;
};

template <typename T> concept bool EqualityComparable = requires(T a, T b) {
{ a == b } -> bool;
};

0 comments on commit 6e44594

Please sign in to comment.