From 79c439134ffeda0ba7c31273bd07e7773c122662 Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 4 Aug 2018 22:31:23 -0300 Subject: [PATCH] Simplify Type Traits example (#35) The `std::is_::value` already returns a `bool`, so comparing it to `1` is unnecessary. --- CPP11.md | 6 +++--- README.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CPP11.md b/CPP11.md index 34c2d59..1e8df39 100644 --- a/CPP11.md +++ b/CPP11.md @@ -604,9 +604,9 @@ std::to_string(123); // == "123" ### Type traits Type traits defines a compile-time template-based interface to query or modify the properties of types. ```c++ -static_assert(std::is_integral::value == 1); -static_assert(std::is_same::value == 1); -static_assert(std::is_same::type, int>::value == 1); +static_assert(std::is_integral::value); +static_assert(std::is_same::value); +static_assert(std::is_same::type, int>::value); ``` ### Smart pointers diff --git a/README.md b/README.md index 85f5760..7b04b5b 100644 --- a/README.md +++ b/README.md @@ -1153,9 +1153,9 @@ std::to_string(123); // == "123" ### Type traits Type traits defines a compile-time template-based interface to query or modify the properties of types. ```c++ -static_assert(std::is_integral::value == 1); -static_assert(std::is_same::value == 1); -static_assert(std::is_same::type, int>::value == 1); +static_assert(std::is_integral::value); +static_assert(std::is_same::value); +static_assert(std::is_same::type, int>::value); ``` ### Smart pointers