Skip to content

Commit 58bb182

Browse files
committed
Housekeeping: Remove trailing whitespace (closes #1 and #2)
And fixed badge link Thanks to @eyalz800 and @Zt-freak
1 parent 8140ab9 commit 58bb182

File tree

10 files changed

+488
-492
lines changed

10 files changed

+488
-492
lines changed

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Copyright (c) Herb Sutter
66
SPDX-License-Identifier: CC-BY-NC-ND-4.0
77
See [License](LICENSE)
88

9-
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
9+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
1010

1111

1212
# Contributor Covenant Code of Conduct

CONTRIBUTING.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11

22
## Contributing to cppfront
33

4-
cppfront is the sole personal project of Herb Sutter.
4+
cppfront is an personal experimental project of Herb Sutter.
55

6-
NO commercial use. NO forks/derivatives.
6+
At this time, the license is limited to no commercial use and no distributed forks/derivatives.
77

8-
Please DO NOT open issues or submit PRs on this repo at this time.
98

10-
The following is for the future when I may accept PRs.
11-
12-
139
## Contributor License Agreement
1410
By contributing content to cppfront (i.e., submitting a pull request for inclusion in this repository):
1511
- You warrant that your material is original, or you have the right to contribute it.

README.md

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

include/cpp2util.h

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
#ifndef _MSC_VER
3737
// This is the ideal -- note that we just voted "import std;"
38-
// into draft C++23 in late July 2022, so implementers haven't
38+
// into draft C++23 in late July 2022, so implementers haven't
3939
// had time to catch up yet. As of this writing (September 2022)
4040
// no compiler will take this path yet, but they're on the way...
4141
import std;
@@ -204,9 +204,9 @@
204204
namespace cpp2 {
205205

206206
//-----------------------------------------------------------------------
207-
//
207+
//
208208
// contract_group
209-
//
209+
//
210210
//-----------------------------------------------------------------------
211211
//
212212

@@ -255,30 +255,30 @@ class contract_group {
255255
std::terminate();
256256
}
257257

258-
auto inline Default = contract_group(
259-
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
258+
auto inline Default = contract_group(
259+
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
260260
report_and_terminate("Contract", msg CPP2_SOURCE_LOCATION_ARG);
261261
}
262262
);
263-
auto inline Bounds = contract_group(
264-
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
263+
auto inline Bounds = contract_group(
264+
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
265265
report_and_terminate("Bounds safety", msg CPP2_SOURCE_LOCATION_ARG);
266-
}
266+
}
267267
);
268-
auto inline Null = contract_group(
269-
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
268+
auto inline Null = contract_group(
269+
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
270270
report_and_terminate("Null safety", msg CPP2_SOURCE_LOCATION_ARG);
271-
}
271+
}
272272
);
273-
auto inline Type = contract_group(
274-
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
273+
auto inline Type = contract_group(
274+
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
275275
report_and_terminate("Type safety", msg CPP2_SOURCE_LOCATION_ARG);
276-
}
276+
}
277277
);
278-
auto inline Testing = contract_group(
279-
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
278+
auto inline Testing = contract_group(
279+
[](CPP2_MESSAGE_PARAM msg CPP2_SOURCE_LOCATION_PARAM)noexcept {
280280
report_and_terminate("Testing", msg CPP2_SOURCE_LOCATION_ARG);
281-
}
281+
}
282282
);
283283

284284
constexpr auto contract_group::set_handler(handler h) -> handler {
@@ -317,12 +317,12 @@ auto assert_in_bounds(auto&& x, auto&& arg CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAU
317317

318318

319319
//-----------------------------------------------------------------------
320-
//
320+
//
321321
// Arena objects for std::allocators
322-
//
322+
//
323323
// Note: cppfront translates "new" to "cpp2_new", so in Cpp2 code
324324
// these are invoked by simply "unique.new<T>" etc.
325-
//
325+
//
326326
//-----------------------------------------------------------------------
327327
//
328328
struct {
@@ -346,13 +346,13 @@ template<typename T, typename... Args>
346346

347347

348348
//-----------------------------------------------------------------------
349-
//
349+
//
350350
// in<T> For "in" parameter
351-
//
351+
//
352352
//-----------------------------------------------------------------------
353353
//
354354
template<typename T>
355-
using in =
355+
using in =
356356
std::conditional_t <
357357
sizeof(T) < 2*sizeof(void*) && std::is_trivially_copy_constructible_v<T>,
358358
T const,
@@ -361,19 +361,19 @@ using in =
361361

362362

363363
//-----------------------------------------------------------------------
364-
//
364+
//
365365
// Initialization: These are closely related...
366-
//
366+
//
367367
// deferred_init<T> For deferred-initialized local or member variable
368368
//
369369
// out<T> For out parameter
370-
//
370+
//
371371
//-----------------------------------------------------------------------
372372
//
373373
template<typename T>
374374
class deferred_init {
375375
bool init = false;
376-
union {
376+
union {
377377
int i;
378378
T t;
379379
};
@@ -414,7 +414,7 @@ class out {
414414
}
415415
}
416416

417-
auto construct (auto ...args) -> void {
417+
auto construct (auto ...args) -> void {
418418
if (has_t) {
419419
*t = T(args...);
420420
}
@@ -427,7 +427,7 @@ class out {
427427
}
428428
}
429429

430-
auto construct_list(auto ...args) -> void {
430+
auto construct_list(auto ...args) -> void {
431431
if (has_t) {
432432
*t = T{args...};
433433
}
@@ -443,9 +443,9 @@ class out {
443443

444444

445445
//-----------------------------------------------------------------------
446-
//
446+
//
447447
// CPP2_UFCS: Variadic macro generating a variadic lamba, oh my...
448-
//
448+
//
449449
//-----------------------------------------------------------------------
450450
//
451451
#define CPP2_UFCS(FUNCNAME,PARAM1,...) \
@@ -468,9 +468,9 @@ class out {
468468

469469

470470
//-----------------------------------------------------------------------
471-
//
471+
//
472472
// is and as
473-
//
473+
//
474474
//-----------------------------------------------------------------------
475475
//
476476
//-------------------------------------------------------------------------------------------------------------
@@ -526,7 +526,7 @@ auto as( X const& x ) -> auto&& {
526526
}
527527

528528
template< typename C, typename X >
529-
auto as( X const& x ) -> auto
529+
auto as( X const& x ) -> auto
530530
requires (!std::is_same_v<C, X> && requires { C{x}; })
531531
{
532532
return C{x};
@@ -640,18 +640,18 @@ constexpr auto as( X const& x ) -> auto&&
640640

641641

642642
//-----------------------------------------------------------------------
643-
//
643+
//
644644
// A variation of GSL's final_action_success and finally to run only on success
645645
// (based on a PR I contributed to Microsoft GSL)
646-
//
646+
//
647647
// final_action_success_success ensures something is run at the end of a scope
648648
// if no exception is thrown
649-
//
649+
//
650650
// finally_success is a convenience function to make a final_action_success_success
651-
//
651+
//
652652
//-----------------------------------------------------------------------
653653
//
654-
654+
655655
template <class F>
656656
class final_action_success
657657
{
@@ -688,9 +688,9 @@ template <class F>
688688

689689

690690
//-----------------------------------------------------------------------
691-
//
691+
//
692692
// to_string for string interpolation
693-
//
693+
//
694694
//-----------------------------------------------------------------------
695695
//
696696
template<typename T>
@@ -725,18 +725,18 @@ using cpp2::cpp2_new;
725725

726726

727727
//-----------------------------------------------------------------------
728-
//
728+
//
729729
// A partial implementation of GSL features Cpp2 relies on,
730730
// to keep this a standalone header without non-std dependencies
731-
//
731+
//
732732
//-----------------------------------------------------------------------
733733
//
734734
namespace gsl {
735735

736736
//-----------------------------------------------------------------------
737-
//
737+
//
738738
// An implementation of GSL's narrow_cast
739-
//
739+
//
740740
//-----------------------------------------------------------------------
741741
//
742742
template<typename To, typename From>

0 commit comments

Comments
 (0)