Skip to content

Commit

Permalink
Add license headers (#11)
Browse files Browse the repository at this point in the history
Let's thrash the whole repository hooray!

The header is the Apache-2.0 license header but re-typeset to not look
like crap in 80col.
  • Loading branch information
mcy committed Jun 22, 2024
1 parent 22d2a9f commit 4c2d903
Show file tree
Hide file tree
Showing 97 changed files with 1,929 additions and 126 deletions.
18 changes: 18 additions & 0 deletions LICENSE.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */
27 changes: 0 additions & 27 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,30 +173,3 @@
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
21 changes: 20 additions & 1 deletion best/base/fwd.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_BASE_FWD_H_
#define BEST_BASE_FWD_H_

Expand Down Expand Up @@ -95,4 +114,4 @@ class test;

} // namespace best

#endif // BEST_BASE_FWD_H_
#endif // BEST_BASE_FWD_H_
21 changes: 20 additions & 1 deletion best/base/hint.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_BASE_HINT_H_
#define BEST_BASE_HINT_H_

Expand Down Expand Up @@ -84,4 +103,4 @@ BEST_INLINE_ALWAYS constexpr void assume(bool truth) {
}
} // namespace best

#endif // BEST_BASE_HINT_H_
#endif // BEST_BASE_HINT_H_
21 changes: 20 additions & 1 deletion best/base/internal/ord.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_BASE_INTERNAL_ORD_H_
#define BEST_BASE_INTERNAL_ORD_H_

Expand Down Expand Up @@ -165,4 +184,4 @@ class chain final {
};
} // namespace best::ord_internal

#endif // BEST_BASE_INTERNAL_ORD_H_
#endif // BEST_BASE_INTERNAL_ORD_H_
21 changes: 20 additions & 1 deletion best/base/ord.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_BASE_ORD_H_
#define BEST_BASE_ORD_H_

Expand Down Expand Up @@ -180,4 +199,4 @@ inline void BestFmt(auto& fmt, best::partial_ord x) {
}
} // namespace best

#endif // BEST_BASE_ORD_H_
#endif // BEST_BASE_ORD_H_
21 changes: 20 additions & 1 deletion best/base/ord_test.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#include "best/base/ord.h"

#include "best/test/test.h"
Expand Down Expand Up @@ -36,4 +55,4 @@ static_assert(same<common_ord<partial_ord>, partial_ord>);
static_assert(same<common_ord<partial_ord, decltype(Less)>, partial_ord>);
static_assert(same<common_ord<ord, partial_ord>, partial_ord>);
static_assert(same<common_ord<ord, partial_ord, ord>, partial_ord>);
} // namespace best::ord_test
} // namespace best::ord_test
21 changes: 20 additions & 1 deletion best/base/port.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_BASE_PORT_H_
#define BEST_BASE_PORT_H_

Expand Down Expand Up @@ -116,4 +135,4 @@ inline constexpr bool is_debug() {
#define BEST_LINK_NAME(sym_) asm(sym_)
} // namespace best

#endif // BEST_BASE_PORT_H_
#endif // BEST_BASE_PORT_H_
21 changes: 20 additions & 1 deletion best/base/unsafe.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_BASE_UNSAFE_H_
#define BEST_BASE_UNSAFE_H_

Expand Down Expand Up @@ -33,4 +52,4 @@ struct unsafe final {
};
} // namespace best

#endif // BEST_BASE_UNSAFE_H_
#endif // BEST_BASE_UNSAFE_H_
20 changes: 19 additions & 1 deletion best/container/bounds.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#include "best/container/bounds.h"

Expand Down Expand Up @@ -45,4 +63,4 @@ namespace best {

std::terminate();
}
} // namespace best
} // namespace best
21 changes: 20 additions & 1 deletion best/container/bounds.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_CONTAINER_BOUNDS_H_
#define BEST_CONTAINER_BOUNDS_H_

Expand Down Expand Up @@ -202,4 +221,4 @@ struct bounds final {
};
} // namespace best

#endif // BEST_CONTAINER_BOUNDS_H_
#endif // BEST_CONTAINER_BOUNDS_H_
21 changes: 20 additions & 1 deletion best/container/bounds_test.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#include "best/container/bounds.h"

#include "best/test/test.h"
Expand Down Expand Up @@ -67,4 +86,4 @@ best::test Debug = [](auto& t) {
};

// TODO: Once we have death tests, test the check-fail messages.
} // namespace best::bounds_test
} // namespace best::bounds_test
21 changes: 20 additions & 1 deletion best/container/choice.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/* //-*- C++ -*-///////////////////////////////////////////////////////////// *\
Copyright 2024
Miguel Young de la Sota and the Best Contributors 🧶🐈‍⬛
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
\* ////////////////////////////////////////////////////////////////////////// */

#ifndef BEST_CONTAINER_CHOICE_H_
#define BEST_CONTAINER_CHOICE_H_

Expand Down Expand Up @@ -535,4 +554,4 @@ constexpr decltype(auto) choice<A...>::index_match(auto... cases) && {
}
} // namespace best

#endif // BEST_CONTAINER_CHOICE_H_
#endif // BEST_CONTAINER_CHOICE_H_
Loading

0 comments on commit 4c2d903

Please sign in to comment.