// <array>
-// Construct with initizializer list
+// Construct with initializer list
#include <array>
#include <cassert>
const fs::path proximate_output = p.lexically_proximate(TC.base);
// [path.gen] lexically_proximate
// Returns: If the value of lexically_relative(base) is not an empty path,
- // return it.Otherwise return *this.
+ // return it. Otherwise return *this.
const fs::path proximate_expected = output.native().empty() ? p
: output;
if (!PathEq(proximate_expected, proximate_output))
TEST_CASE(test_signature_6) {
// FIXME? If the trailing separator occurs in a part of the path that exists,
- // it is ommitted. Otherwise it is added to the end of the result.
+ // it is omitted. Otherwise it is added to the end of the result.
fs::path p(StaticEnv::SymlinkToDir / "dir2/./");
const fs::path output = fs::weakly_canonical(p);
TEST_CHECK(output == std::string(StaticEnv::Dir / "dir2"));
{StaticEnv::SymlinkToDir, StaticEnv::Dir},
{StaticEnv::SymlinkToDir / "dir2/.", StaticEnv::Dir / "dir2"},
// FIXME? If the trailing separator occurs in a part of the path that exists,
- // it is ommitted. Otherwise it is added to the end of the result.
+ // it is omitted. Otherwise it is added to the end of the result.
{StaticEnv::SymlinkToDir / "dir2/./", StaticEnv::Dir / "dir2"},
{StaticEnv::SymlinkToDir / "dir2/DNE/./", StaticEnv::Dir / "dir2/DNE/"},
{StaticEnv::SymlinkToDir / "dir2", StaticEnv::Dir2},
// template <class StateT> class fpos
-// Subraction with fpos
+// Subtraction with fpos
#include <ios>
#include <cassert>
// template <class StateT> class fpos
-// Subraction with offset
+// Subtraction with offset
#include <ios>
#include <cassert>
void test_big()
{
- long long int big_value = std::numeric_limits<long long int>::max(); // a value to big for ints to store
+ long long int big_value = std::numeric_limits<long long int>::max(); // a value too big for ints to store
long long int negative_big_value = -big_value;
- assert(std::abs(negative_big_value) == big_value); // make sure it doesnt get casted to a smaller type
+ assert(std::abs(negative_big_value) == big_value); // make sure it doesn't get casted to a smaller type
}
// The following is helpful to keep in mind:
// <string>
-// int compare(size_type pos1, size_type n1, basic_string_vew sv) const;
+// int compare(size_type pos1, size_type n1, basic_string_view sv) const;
// When back-deploying to macosx10.7, the RTTI for exception classes
// incorrectly provided by libc++.dylib is mixed with the one in
// <string>
// template<class charT, class traits, class Allocator>
-// constexpr bool operator>=(const charT* lhs, basic_string_wiew<charT,traits> rhs);
+// constexpr bool operator>=(const charT* lhs, basic_string_view<charT,traits> rhs);
// template<class charT, class traits, class Allocator>
-// constexpr bool operator>=(basic_string_wiew<charT,traits> lhs, const charT* rhs);
+// constexpr bool operator>=(basic_string_view<charT,traits> lhs, const charT* rhs);
#include <string_view>
#include <cassert>
// <string>
// constexpr template<class charT, class traits, class Allocator>
-// bool operator>(const charT* lhs, basic_string_wiew<charT,traits> rhs);
+// bool operator>(const charT* lhs, basic_string_view<charT,traits> rhs);
// constexpr template<class charT, class traits, class Allocator>
-// bool operator>(basic_string_wiew<charT,traits> lhs, const charT* rhs);
+// bool operator>(basic_string_view<charT,traits> lhs, const charT* rhs);
#include <string_view>
#include <cassert>
// <string>
// template<class charT, class traits, class Allocator>
-// constexpr bool operator<=(const charT* lhs, basic_string_wiew<charT,traits> rhs);
+// constexpr bool operator<=(const charT* lhs, basic_string_view<charT,traits> rhs);
// template<class charT, class traits, class Allocator>
-// constexpr bool operator<=(basic_string_wiew<charT,traits> lhs, const charT* rhs);
+// constexpr bool operator<=(basic_string_view<charT,traits> lhs, const charT* rhs);
#include <string_view>
#include <cassert>
// <string>
// template<class charT, class traits, class Allocator>
-// constexpr bool operator<(const charT* lhs, basic_string_wiew<charT,traits> rhs);
+// constexpr bool operator<(const charT* lhs, basic_string_view<charT,traits> rhs);
// template<class charT, class traits, class Allocator>
-// constexpr bool operator<(basic_string_wiew<charT,traits> lhs, const charT* rhs);
+// constexpr bool operator<(basic_string_view<charT,traits> lhs, const charT* rhs);
#include <string_view>
#include <cassert>
assert(p);
}
// Test the return value of the builtin for basic sanity only. It's the
- // compilers job to test tho builtin for correctness.
+ // compiler's job to test the builtin for correctness.
{
static_assert(std::is_constant_evaluated(), "");
bool p = std::is_constant_evaluated();
// Ensure that CannotInstantiate is not instantiated by is_convertible when it is not needed.
- // For example CannotInstantiate is instatiated as a part of ADL lookup for arguments of type CannotInstantiate*.
+ // For example CannotInstantiate is instantiated as a part of ADL lookup for arguments of type CannotInstantiate*.
static_assert((std::is_convertible<CannotInstantiate<int>*, CannotInstantiate<int>*>::value), "");
return 0;
static_assert(!std::is_swappable_v<optional<T>>, "");
}
{
- // Even thought CopyOnly has deleted move operations, those operations
+ // Even though CopyOnly has deleted move operations, those operations
// cause optional<CopyOnly> to have implicitly deleted move operations
// that decay into copies.
using T = TestTypes::CopyOnly;
static_assert(std::is_nothrow_assignable<U1C, U1&&>::value, "");
}
{ // Test that non-reference destination deleters can be assigned
- // from any source deleter type with a sutible conversion. Including
+ // from any source deleter type with a suitable conversion. Including
// reference types.
using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
// 1 The moved from pointer is empty and the new pointer stores the old value.
// 2 The only requirement on the deleter is that it is MoveConstructible
// or a reference.
-// 3 The constructor works for explicitly moved values (ie std::move(x))
-// 4 The constructor works for true temporaries (ie a return value)
+// 3 The constructor works for explicitly moved values (i.e. std::move(x))
+// 4 The constructor works for true temporaries (e.g. a return value)
//
// Plan
// 1 Explicitly construct unique_ptr<T, D> for various deleter types 'D'.
static_assert(std::is_nothrow_constructible<U1C, U1&&>::value, "");
}
{ // Test that non-reference destination deleters can be constructed
- // from any source deleter type with a sutible conversion. Including
+ // from any source deleter type with a suitable conversion. Including
// reference types.
using U1 = std::unique_ptr<VT, GenericConvertingDeleter<0> >;
using U2 = std::unique_ptr<VT, GenericConvertingDeleter<0> &>;
template <class VT>
void test_sfinae() {
#if TEST_STD_VER >= 11
- { // the constructor does not participate in overload resultion when
+ { // the constructor does not participate in overload resolution when
// the deleter is a pointer type
using U = std::unique_ptr<VT, void (*)(void*)>;
static_assert(!std::is_constructible<U, decltype(nullptr)>::value, "");
template <class T>
void test_sfinae() {
#if TEST_STD_VER >= 11
- { // the constructor does not participate in overload resultion when
+ { // the constructor does not participate in overload resolution when
// the deleter is a pointer type
using U = std::unique_ptr<T, void (*)(void*)>;
static_assert(!std::is_constructible<U, T*>::value, "");
static_assert( weekday{0}.ok(), "");
static_assert( weekday{1}.ok(), "");
- static_assert( weekday{7}.ok(), ""); // 7 is transmorgified into 0 in the ctor
+ static_assert( weekday{7}.ok(), ""); // 7 is transmogrified into 0 in the ctor
static_assert(!weekday{8}.ok(), "");
for (unsigned i = 0; i <= 7; ++i)
}
{
// Test that tuple evaluates correctly applies an lvalue reference
- // before evaluating is_assignable (ie 'is_assignable<int&, int&>')
+ // before evaluating is_assignable (i.e. 'is_assignable<int&, int&>')
// instead of evaluating 'is_assignable<int&&, int&>' which is false.
int x = 42;
int y = 43;
}
{
// Test that tuple evaluates correctly applies an lvalue reference
- // before evaluating is_assignable (ie 'is_assignable<int&, int&&>')
+ // before evaluating is_assignable (i.e. 'is_assignable<int&, int&&>')
// instead of evaluating 'is_assignable<int&&, int&&>' which is false.
int x = 42;
int y = 43;