From 71217337352d8552008092907210ead808fa26a0 Mon Sep 17 00:00:00 2001 From: yamacir-kit Date: Thu, 14 Nov 2024 23:11:39 +0900 Subject: [PATCH] Cleanup namespace definitions Signed-off-by: yamacir-kit --- README.md | 6 +++--- VERSION | 2 +- configure/version.cpp | 7 ++----- .../meevax/kernel/binary_input_file_port.hpp | 7 ++----- include/meevax/kernel/binary_input_port.hpp | 7 ++----- .../meevax/kernel/binary_output_file_port.hpp | 7 ++----- include/meevax/kernel/binary_output_port.hpp | 7 ++----- include/meevax/kernel/binary_port.hpp | 7 ++----- include/meevax/kernel/boolean.hpp | 7 ++----- include/meevax/kernel/boot.hpp | 7 ++----- include/meevax/kernel/box.hpp | 7 ++----- include/meevax/kernel/character.hpp | 7 ++----- include/meevax/kernel/closure.hpp | 7 ++----- include/meevax/kernel/comparator.hpp | 7 ++----- include/meevax/kernel/complex.hpp | 7 ++----- include/meevax/kernel/conditional_expand.hpp | 7 ++----- include/meevax/kernel/configurator.hpp | 7 ++----- include/meevax/kernel/continuation.hpp | 7 ++----- include/meevax/kernel/describable.hpp | 7 ++----- include/meevax/kernel/dynamic_environment.hpp | 7 ++----- include/meevax/kernel/environment.hpp | 7 ++----- include/meevax/kernel/eof.hpp | 7 ++----- include/meevax/kernel/error.hpp | 7 ++----- include/meevax/kernel/exact_integer.hpp | 7 ++----- include/meevax/kernel/ghost.hpp | 7 ++----- include/meevax/kernel/homogeneous_vector.hpp | 7 ++----- include/meevax/kernel/identifier.hpp | 7 ++----- include/meevax/kernel/identity.hpp | 7 ++----- include/meevax/kernel/include.hpp | 7 ++----- include/meevax/kernel/input_file_port.hpp | 7 ++----- .../kernel/input_homogeneous_vector_port.hpp | 7 ++----- include/meevax/kernel/input_port.hpp | 7 ++----- include/meevax/kernel/input_string_port.hpp | 7 ++----- include/meevax/kernel/instruction.hpp | 7 ++----- .../meevax/kernel/interaction_environment.hpp | 7 ++----- include/meevax/kernel/library.hpp | 7 ++----- include/meevax/kernel/list.hpp | 7 ++----- include/meevax/kernel/optimizer.hpp | 7 ++----- include/meevax/kernel/output_file_port.hpp | 7 ++----- .../kernel/output_homogeneous_vector_port.hpp | 7 ++----- include/meevax/kernel/output_port.hpp | 7 ++----- include/meevax/kernel/output_string_port.hpp | 7 ++----- include/meevax/kernel/port.hpp | 7 ++----- include/meevax/kernel/procedure.hpp | 7 ++----- include/meevax/kernel/ratio.hpp | 7 ++----- include/meevax/kernel/standard_error_port.hpp | 7 ++----- include/meevax/kernel/standard_input_port.hpp | 7 ++----- .../meevax/kernel/standard_output_port.hpp | 7 ++----- include/meevax/kernel/string.hpp | 7 ++----- include/meevax/kernel/symbol.hpp | 7 ++----- .../meevax/kernel/syntactic_environment.hpp | 7 ++----- include/meevax/kernel/textual_input_port.hpp | 7 ++----- include/meevax/kernel/textual_output_port.hpp | 7 ++----- include/meevax/kernel/textual_port.hpp | 7 ++----- include/meevax/kernel/transformer.hpp | 7 ++----- include/meevax/kernel/vector.hpp | 7 ++----- include/meevax/kernel/version.hpp | 7 ++----- include/meevax/type_traits/integer.hpp | 7 ++----- .../type_traits/is_array_subscriptable.hpp | 10 +++++----- .../meevax/type_traits/is_dereferenceable.hpp | 9 ++++----- .../type_traits/is_equality_comparable.hpp | 7 ++----- .../type_traits/is_output_streamable.hpp | 7 ++----- .../type_traits/is_reference_wrapper.hpp | 7 ++----- include/meevax/utility/hexdump.hpp | 19 ++++++++++++++----- src/chrono/duration.cpp | 7 ++----- src/kernel/binary_input_file_port.cpp | 7 ++----- src/kernel/binary_output_file_port.cpp | 7 ++----- src/kernel/boolean.cpp | 7 ++----- src/kernel/boot.cpp | 7 ++----- src/kernel/box.cpp | 7 ++----- src/kernel/character.cpp | 7 ++----- src/kernel/closure.cpp | 7 ++----- src/kernel/comparator.cpp | 7 ++----- src/kernel/complex.cpp | 7 ++----- src/kernel/conditional_expand.cpp | 7 ++----- src/kernel/continuation.cpp | 7 ++----- src/kernel/dynamic_environment.cpp | 7 ++----- src/kernel/environment.cpp | 7 ++----- src/kernel/eof.cpp | 7 ++----- src/kernel/error.cpp | 7 ++----- src/kernel/exact_integer.cpp | 7 ++----- src/kernel/ghost.cpp | 7 ++----- src/kernel/identity.cpp | 7 ++----- src/kernel/include.cpp | 7 ++----- src/kernel/input_file_port.cpp | 7 ++----- src/kernel/input_string_port.cpp | 7 ++----- src/kernel/instruction.cpp | 7 ++----- src/kernel/interaction_environment.cpp | 7 ++----- src/kernel/library.cpp | 7 ++----- src/kernel/list.cpp | 7 ++----- src/kernel/number.cpp | 7 ++----- src/kernel/optimizer.cpp | 7 ++----- src/kernel/output_file_port.cpp | 7 ++----- src/kernel/output_string_port.cpp | 7 ++----- src/kernel/procedure.cpp | 7 ++----- src/kernel/ratio.cpp | 7 ++----- src/kernel/standard_error_port.cpp | 7 ++----- src/kernel/standard_input_port.cpp | 7 ++----- src/kernel/standard_output_port.cpp | 7 ++----- src/kernel/string.cpp | 7 ++----- src/kernel/symbol.cpp | 7 ++----- src/kernel/textual_input_port.cpp | 7 ++----- src/kernel/textual_output_port.cpp | 7 ++----- src/kernel/transformer.cpp | 7 ++----- src/kernel/vector.cpp | 7 ++----- src/memory/model.cpp | 7 ++----- src/utility/demangle.cpp | 7 ++----- 107 files changed, 231 insertions(+), 529 deletions(-) diff --git a/README.md b/README.md index 2aa39989b..56f000b31 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Procedures for each standard are provided by the following R7RS-style libraries: cmake -B build -DCMAKE_BUILD_TYPE=Release cd build make package -sudo apt install build/meevax_0.5.269_amd64.deb +sudo apt install build/meevax_0.5.270_amd64.deb ``` or @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax | Target Name | Description |-------------|------------- -| `all` | Build shared-library `libmeevax.0.5.269.so` and executable `meevax` +| `all` | Build shared-library `libmeevax.0.5.270.so` and executable `meevax` | `test` | Test executable `meevax` -| `package` | Generate debian package `meevax_0.5.269_amd64.deb` +| `package` | Generate debian package `meevax_0.5.270_amd64.deb` | `install` | Copy files into `/usr/local` directly ## Usage diff --git a/VERSION b/VERSION index 5b08c5db7..0f0c249a9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.269 +0.5.270 diff --git a/configure/version.cpp b/configure/version.cpp index ba00823a9..e2b0b23f2 100644 --- a/configure/version.cpp +++ b/configure/version.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto help() noexcept -> std::string_view { @@ -51,5 +49,4 @@ inline namespace kernel let static const version = make_symbol("${PROJECT_VERSION}"); return version; } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/include/meevax/kernel/binary_input_file_port.hpp b/include/meevax/kernel/binary_input_file_port.hpp index c24896966..c7779d618 100644 --- a/include/meevax/kernel/binary_input_file_port.hpp +++ b/include/meevax/kernel/binary_input_file_port.hpp @@ -22,9 +22,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct binary_input_file_port : public binary_input_port { @@ -52,7 +50,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, binary_input_file_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BINARY_INPUT_FILE_PORT_HPP diff --git a/include/meevax/kernel/binary_input_port.hpp b/include/meevax/kernel/binary_input_port.hpp index 07c1a27ef..3ce8ef3dd 100644 --- a/include/meevax/kernel/binary_input_port.hpp +++ b/include/meevax/kernel/binary_input_port.hpp @@ -21,9 +21,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct binary_input_port : public virtual binary_port, public virtual input_port { @@ -35,7 +33,6 @@ inline namespace kernel virtual auto peek() -> object = 0; }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BINARY_INPUT_PORT_HPP diff --git a/include/meevax/kernel/binary_output_file_port.hpp b/include/meevax/kernel/binary_output_file_port.hpp index 89359b3f5..2b97819cb 100644 --- a/include/meevax/kernel/binary_output_file_port.hpp +++ b/include/meevax/kernel/binary_output_file_port.hpp @@ -22,9 +22,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct binary_output_file_port : public binary_output_port { @@ -50,7 +48,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, binary_output_file_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BINARY_OUTPUT_FILE_PORT_HPP diff --git a/include/meevax/kernel/binary_output_port.hpp b/include/meevax/kernel/binary_output_port.hpp index 475bc4303..aae143952 100644 --- a/include/meevax/kernel/binary_output_port.hpp +++ b/include/meevax/kernel/binary_output_port.hpp @@ -21,9 +21,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct binary_output_port : public virtual binary_port, public virtual output_port { @@ -31,7 +29,6 @@ inline namespace kernel virtual auto put(u8vector const&) -> void = 0; }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BINARY_OUTPUT_PORT_HPP diff --git a/include/meevax/kernel/binary_port.hpp b/include/meevax/kernel/binary_port.hpp index 9665a205a..779728a8c 100644 --- a/include/meevax/kernel/binary_port.hpp +++ b/include/meevax/kernel/binary_port.hpp @@ -19,13 +19,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct binary_port : public virtual port {}; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BINARY_PORT_HPP diff --git a/include/meevax/kernel/boolean.hpp b/include/meevax/kernel/boolean.hpp index 74db373a7..6d7e216da 100644 --- a/include/meevax/kernel/boolean.hpp +++ b/include/meevax/kernel/boolean.hpp @@ -19,14 +19,11 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { let extern const t; let extern const f; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BOOLEAN_HPP diff --git a/include/meevax/kernel/boot.hpp b/include/meevax/kernel/boot.hpp index d7eaa7781..5606aff7c 100644 --- a/include/meevax/kernel/boot.hpp +++ b/include/meevax/kernel/boot.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto boot() -> void; @@ -37,7 +35,6 @@ inline namespace kernel } } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BOOT_HPP diff --git a/include/meevax/kernel/box.hpp b/include/meevax/kernel/box.hpp index 92bcdc4fc..4a64d181b 100644 --- a/include/meevax/kernel/box.hpp +++ b/include/meevax/kernel/box.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct box : public virtual pair // (value . null) { @@ -29,7 +27,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, box const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_BOX_HPP diff --git a/include/meevax/kernel/character.hpp b/include/meevax/kernel/character.hpp index 7ab3721a7..df247632b 100644 --- a/include/meevax/kernel/character.hpp +++ b/include/meevax/kernel/character.hpp @@ -22,9 +22,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct character { @@ -212,7 +210,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, character const&) -> std::ostream &; // write -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_CHARACTER_HPP diff --git a/include/meevax/kernel/closure.hpp b/include/meevax/kernel/closure.hpp index 1fc2bec9d..f6e2af977 100644 --- a/include/meevax/kernel/closure.hpp +++ b/include/meevax/kernel/closure.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct closure : public virtual pair { @@ -29,7 +27,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, closure const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_CLOSURE_HPP diff --git a/include/meevax/kernel/comparator.hpp b/include/meevax/kernel/comparator.hpp index 314696b73..66c943ae4 100644 --- a/include/meevax/kernel/comparator.hpp +++ b/include/meevax/kernel/comparator.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { inline auto eq = [](auto const& x, auto const& y) constexpr { @@ -34,7 +32,6 @@ inline namespace kernel }; auto equal(object const&, object const&) -> bool; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_COMPARATOR_HPP diff --git a/include/meevax/kernel/complex.hpp b/include/meevax/kernel/complex.hpp index e3417550f..a1cb81349 100644 --- a/include/meevax/kernel/complex.hpp +++ b/include/meevax/kernel/complex.hpp @@ -21,9 +21,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct complex : public virtual pair // ( . ) { @@ -49,7 +47,6 @@ inline namespace kernel auto magnitude(object const&) -> object; auto angle(object const&) -> object; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_COMPLEX_HPP diff --git a/include/meevax/kernel/conditional_expand.hpp b/include/meevax/kernel/conditional_expand.hpp index b213e0e55..fc3f7cdc5 100644 --- a/include/meevax/kernel/conditional_expand.hpp +++ b/include/meevax/kernel/conditional_expand.hpp @@ -19,12 +19,9 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto conditional_expand(object const&) -> object; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_CONDITIONAL_EXPAND_HPP diff --git a/include/meevax/kernel/configurator.hpp b/include/meevax/kernel/configurator.hpp index 7d83317e2..4df2625cf 100644 --- a/include/meevax/kernel/configurator.hpp +++ b/include/meevax/kernel/configurator.hpp @@ -24,9 +24,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { template struct configurator @@ -158,7 +156,6 @@ inline namespace kernel } } }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_CONFIGURATOR_HPP diff --git a/include/meevax/kernel/continuation.hpp b/include/meevax/kernel/continuation.hpp index 2a5762c10..e487807e8 100644 --- a/include/meevax/kernel/continuation.hpp +++ b/include/meevax/kernel/continuation.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct continuation : public virtual pair { @@ -29,7 +27,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, continuation const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_CONTINUATION_HPP diff --git a/include/meevax/kernel/describable.hpp b/include/meevax/kernel/describable.hpp index 51ff4a923..f56d8d4dd 100644 --- a/include/meevax/kernel/describable.hpp +++ b/include/meevax/kernel/describable.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct describable { @@ -32,7 +30,6 @@ inline namespace kernel : name { std::forward(xs)... } {} }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_DESCRIBABLE_HPP diff --git a/include/meevax/kernel/dynamic_environment.hpp b/include/meevax/kernel/dynamic_environment.hpp index ce7018e20..2bd741a3b 100644 --- a/include/meevax/kernel/dynamic_environment.hpp +++ b/include/meevax/kernel/dynamic_environment.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct dynamic_environment { @@ -83,7 +81,6 @@ inline namespace kernel auto run() -> object; }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_DYNAMIC_ENVIRONMENT_HPP diff --git a/include/meevax/kernel/environment.hpp b/include/meevax/kernel/environment.hpp index 47623bee3..b95aa5654 100644 --- a/include/meevax/kernel/environment.hpp +++ b/include/meevax/kernel/environment.hpp @@ -21,9 +21,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct environment : public configurator , public dynamic_environment @@ -43,7 +41,6 @@ inline namespace kernel extern template struct configurator; extern template struct syntactic_environment; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_ENVIRONMENT_HPP diff --git a/include/meevax/kernel/eof.hpp b/include/meevax/kernel/eof.hpp index 76e17f29f..c77edda93 100644 --- a/include/meevax/kernel/eof.hpp +++ b/include/meevax/kernel/eof.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct eof {}; @@ -29,7 +27,6 @@ inline namespace kernel let extern const eof_object; auto operator <<(std::ostream &, eof const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_EOF_HPP diff --git a/include/meevax/kernel/error.hpp b/include/meevax/kernel/error.hpp index e4f0822f8..c9e1c2398 100644 --- a/include/meevax/kernel/error.hpp +++ b/include/meevax/kernel/error.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct error : public virtual pair // ( . ) , public std::exception @@ -120,7 +118,6 @@ inline namespace kernel return EXIT_FAILURE; } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_ERROR_HPP diff --git a/include/meevax/kernel/exact_integer.hpp b/include/meevax/kernel/exact_integer.hpp index 03e35401d..2f989d0ae 100644 --- a/include/meevax/kernel/exact_integer.hpp +++ b/include/meevax/kernel/exact_integer.hpp @@ -23,9 +23,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct exact_integer { @@ -131,7 +129,6 @@ inline namespace kernel }; let extern const e0, e1; // Frequently used exact-integer values. -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_EXACT_INTEGER_HPP diff --git a/include/meevax/kernel/ghost.hpp b/include/meevax/kernel/ghost.hpp index ead7c2b4f..d7607b099 100644 --- a/include/meevax/kernel/ghost.hpp +++ b/include/meevax/kernel/ghost.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct ghost { @@ -33,7 +31,6 @@ inline namespace kernel let extern const unspecified; let extern const undefined; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_GHOST_HPP diff --git a/include/meevax/kernel/homogeneous_vector.hpp b/include/meevax/kernel/homogeneous_vector.hpp index 611d0e78a..2ffc676c6 100644 --- a/include/meevax/kernel/homogeneous_vector.hpp +++ b/include/meevax/kernel/homogeneous_vector.hpp @@ -23,9 +23,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { template struct homogeneous_vector : private std::valarray @@ -123,7 +121,6 @@ inline namespace kernel using f32vector = homogeneous_vector; using f64vector = homogeneous_vector; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_HOMOGENEOUS_VECTOR_HPP diff --git a/include/meevax/kernel/identifier.hpp b/include/meevax/kernel/identifier.hpp index de36684f2..23eb63472 100644 --- a/include/meevax/kernel/identifier.hpp +++ b/include/meevax/kernel/identifier.hpp @@ -17,13 +17,10 @@ #ifndef INCLUDED_MEEVAX_KERNEL_IDENTIFIER_HPP #define INCLUDED_MEEVAX_KERNEL_IDENTIFIER_HPP -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct identifier {}; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_IDENTIFIER_HPP diff --git a/include/meevax/kernel/identity.hpp b/include/meevax/kernel/identity.hpp index eb144eaf4..ba4d23a82 100644 --- a/include/meevax/kernel/identity.hpp +++ b/include/meevax/kernel/identity.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct absolute : public virtual pair // ( . ) { @@ -49,7 +47,6 @@ inline namespace kernel { return false; // for free-identifier=? } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_IDENTITY_HPP diff --git a/include/meevax/kernel/include.hpp b/include/meevax/kernel/include.hpp index e0383d66c..0afdb9ad7 100644 --- a/include/meevax/kernel/include.hpp +++ b/include/meevax/kernel/include.hpp @@ -19,12 +19,9 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto include(object const&, bool = true, object const& = nullptr) -> object; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INCLUDE_HPP diff --git a/include/meevax/kernel/input_file_port.hpp b/include/meevax/kernel/input_file_port.hpp index 3150daed4..0526b03a9 100644 --- a/include/meevax/kernel/input_file_port.hpp +++ b/include/meevax/kernel/input_file_port.hpp @@ -21,9 +21,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct input_file_port : public textual_input_port { @@ -49,7 +47,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, input_file_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INPUT_FILE_PORT_HPP diff --git a/include/meevax/kernel/input_homogeneous_vector_port.hpp b/include/meevax/kernel/input_homogeneous_vector_port.hpp index 994540a20..99f0a0705 100644 --- a/include/meevax/kernel/input_homogeneous_vector_port.hpp +++ b/include/meevax/kernel/input_homogeneous_vector_port.hpp @@ -23,9 +23,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { template struct input_homogeneous_vector_port : public binary_input_port @@ -98,7 +96,6 @@ inline namespace kernel } using input_u8vector_port = input_homogeneous_vector_port; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INPUT_HOMOGENEOUS_VECTOR_PORT_HPP diff --git a/include/meevax/kernel/input_port.hpp b/include/meevax/kernel/input_port.hpp index e6ffd6ea7..1e1bc8ee4 100644 --- a/include/meevax/kernel/input_port.hpp +++ b/include/meevax/kernel/input_port.hpp @@ -19,13 +19,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct input_port : public virtual port {}; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INPUT_PORT_HPP diff --git a/include/meevax/kernel/input_string_port.hpp b/include/meevax/kernel/input_string_port.hpp index 2cd6bd2cf..d97844ed6 100644 --- a/include/meevax/kernel/input_string_port.hpp +++ b/include/meevax/kernel/input_string_port.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct input_string_port : public textual_input_port { @@ -47,7 +45,6 @@ namespace literals { auto operator ""_r(char const*, std::size_t) -> object; } // namespace literals -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INPUT_STRING_PORT_HPP diff --git a/include/meevax/kernel/instruction.hpp b/include/meevax/kernel/instruction.hpp index 6847c5df4..cdf3c3659 100644 --- a/include/meevax/kernel/instruction.hpp +++ b/include/meevax/kernel/instruction.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { enum class instruction { @@ -51,7 +49,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, instruction const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INSTRUCTION_HPP diff --git a/include/meevax/kernel/interaction_environment.hpp b/include/meevax/kernel/interaction_environment.hpp index 4fc778b59..7da467b09 100644 --- a/include/meevax/kernel/interaction_environment.hpp +++ b/include/meevax/kernel/interaction_environment.hpp @@ -19,12 +19,9 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto interaction_environment() -> object const&; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_INTERACTION_ENVIRONMENT_HPP diff --git a/include/meevax/kernel/library.hpp b/include/meevax/kernel/library.hpp index 661e1285c..26380afa7 100644 --- a/include/meevax/kernel/library.hpp +++ b/include/meevax/kernel/library.hpp @@ -22,9 +22,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct library : public environment { @@ -76,7 +74,6 @@ inline namespace kernel return interaction_environment().as().define(name, std::forward(xs)...); } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_LIBRARY_HPP diff --git a/include/meevax/kernel/list.hpp b/include/meevax/kernel/list.hpp index cb8e768ed..2a92741a6 100644 --- a/include/meevax/kernel/list.hpp +++ b/include/meevax/kernel/list.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct from_list_tag { @@ -160,7 +158,6 @@ inline namespace kernel } auto longest_common_tail(let const&, let const&) -> object const&; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_LIST_HPP diff --git a/include/meevax/kernel/optimizer.hpp b/include/meevax/kernel/optimizer.hpp index 56a8066d4..8cc8d82cb 100644 --- a/include/meevax/kernel/optimizer.hpp +++ b/include/meevax/kernel/optimizer.hpp @@ -19,12 +19,9 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto optimize(object) -> object; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_OPTIMIZER_HPP diff --git a/include/meevax/kernel/output_file_port.hpp b/include/meevax/kernel/output_file_port.hpp index 95000450e..01a32d739 100644 --- a/include/meevax/kernel/output_file_port.hpp +++ b/include/meevax/kernel/output_file_port.hpp @@ -21,9 +21,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct output_file_port : public textual_output_port { @@ -45,7 +43,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, output_file_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_OUTPUT_FILE_PORT_HPP diff --git a/include/meevax/kernel/output_homogeneous_vector_port.hpp b/include/meevax/kernel/output_homogeneous_vector_port.hpp index 7f7ddf656..a5b0bf04e 100644 --- a/include/meevax/kernel/output_homogeneous_vector_port.hpp +++ b/include/meevax/kernel/output_homogeneous_vector_port.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { template struct output_homogeneous_vector_port : public binary_output_port @@ -60,7 +58,6 @@ inline namespace kernel } using output_u8vector_port = output_homogeneous_vector_port; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_OUTPUT_HOMOGENEOUS_VECTOR_PORT_HPP diff --git a/include/meevax/kernel/output_port.hpp b/include/meevax/kernel/output_port.hpp index 81f94ac88..da2bc6b72 100644 --- a/include/meevax/kernel/output_port.hpp +++ b/include/meevax/kernel/output_port.hpp @@ -19,15 +19,12 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct output_port : public virtual port { virtual auto flush() -> void = 0; }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_OUTPUT_PORT_HPP diff --git a/include/meevax/kernel/output_string_port.hpp b/include/meevax/kernel/output_string_port.hpp index 3dc93dea8..50a9812e7 100644 --- a/include/meevax/kernel/output_string_port.hpp +++ b/include/meevax/kernel/output_string_port.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct output_string_port : public textual_output_port { @@ -40,7 +38,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, output_string_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_OUTPUT_STRING_PORT_HPP diff --git a/include/meevax/kernel/port.hpp b/include/meevax/kernel/port.hpp index fb31a9669..95546f931 100644 --- a/include/meevax/kernel/port.hpp +++ b/include/meevax/kernel/port.hpp @@ -17,9 +17,7 @@ #ifndef INCLUDED_MEEVAX_KERNEL_PORT_HPP #define INCLUDED_MEEVAX_KERNEL_PORT_HPP -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct port { @@ -27,7 +25,6 @@ inline namespace kernel virtual auto is_open() const -> bool = 0; }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_PORT_HPP diff --git a/include/meevax/kernel/procedure.hpp b/include/meevax/kernel/procedure.hpp index 2e1cc458e..e46014aee 100644 --- a/include/meevax/kernel/procedure.hpp +++ b/include/meevax/kernel/procedure.hpp @@ -21,9 +21,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct primitive : public describable { @@ -149,7 +147,6 @@ inline namespace kernel template using procedure = procedure_traits; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_PROCEDURE_HPP diff --git a/include/meevax/kernel/ratio.hpp b/include/meevax/kernel/ratio.hpp index ef55b8bdc..fb1fe1b3b 100644 --- a/include/meevax/kernel/ratio.hpp +++ b/include/meevax/kernel/ratio.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct ratio { @@ -52,7 +50,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, ratio const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_RATIO_HPP diff --git a/include/meevax/kernel/standard_error_port.hpp b/include/meevax/kernel/standard_error_port.hpp index 2d39cb900..2434bb0d9 100644 --- a/include/meevax/kernel/standard_error_port.hpp +++ b/include/meevax/kernel/standard_error_port.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct standard_error_port : public textual_output_port { @@ -33,7 +31,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, standard_error_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_STANDARD_ERROR_PORT_HPP diff --git a/include/meevax/kernel/standard_input_port.hpp b/include/meevax/kernel/standard_input_port.hpp index 293fdb4b2..100a2b8b4 100644 --- a/include/meevax/kernel/standard_input_port.hpp +++ b/include/meevax/kernel/standard_input_port.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct standard_input_port : public textual_input_port { @@ -37,7 +35,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, standard_input_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_STANDARD_INPUT_PORT_HPP diff --git a/include/meevax/kernel/standard_output_port.hpp b/include/meevax/kernel/standard_output_port.hpp index ce2a775be..0de6ced36 100644 --- a/include/meevax/kernel/standard_output_port.hpp +++ b/include/meevax/kernel/standard_output_port.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct standard_output_port : public textual_output_port { @@ -33,7 +31,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, standard_output_port const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_STANDARD_OUTPUT_PORT_HPP diff --git a/include/meevax/kernel/string.hpp b/include/meevax/kernel/string.hpp index 5baabcde7..bf7c63bac 100644 --- a/include/meevax/kernel/string.hpp +++ b/include/meevax/kernel/string.hpp @@ -22,9 +22,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct string : private std::vector { @@ -54,7 +52,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, string const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_STRING_HPP diff --git a/include/meevax/kernel/symbol.hpp b/include/meevax/kernel/symbol.hpp index 4e634e2ba..9ee60f0dd 100644 --- a/include/meevax/kernel/symbol.hpp +++ b/include/meevax/kernel/symbol.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct symbol : public identifier { @@ -54,7 +52,6 @@ inline namespace kernel auto symbols() -> std::unordered_map &; auto make_symbol(std::string const&) -> object const&; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_SYMBOL_HPP diff --git a/include/meevax/kernel/syntactic_environment.hpp b/include/meevax/kernel/syntactic_environment.hpp index 6d1687ba5..ff844d2dc 100644 --- a/include/meevax/kernel/syntactic_environment.hpp +++ b/include/meevax/kernel/syntactic_environment.hpp @@ -24,9 +24,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { template struct syntactic_environment : public virtual pair // ( . ) @@ -1149,7 +1147,6 @@ inline namespace kernel return xs; } }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_SYNTACTIC_ENVIRONMENT_HPP diff --git a/include/meevax/kernel/textual_input_port.hpp b/include/meevax/kernel/textual_input_port.hpp index 7cbb75df9..eb6d0f314 100644 --- a/include/meevax/kernel/textual_input_port.hpp +++ b/include/meevax/kernel/textual_input_port.hpp @@ -25,9 +25,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct textual_input_port : public virtual textual_port, public virtual input_port { @@ -210,7 +208,6 @@ inline namespace kernel '|', // 0x7C '}'); // 0x7D } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_TEXTUAL_INPUT_PORT_HPP diff --git a/include/meevax/kernel/textual_output_port.hpp b/include/meevax/kernel/textual_output_port.hpp index f8b54c596..173965c76 100644 --- a/include/meevax/kernel/textual_output_port.hpp +++ b/include/meevax/kernel/textual_output_port.hpp @@ -22,9 +22,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct textual_output_port : public virtual textual_port, public virtual output_port { @@ -40,7 +38,6 @@ inline namespace kernel explicit virtual operator std::ostream &() = 0; }; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_TEXTUAL_OUTPUT_PORT_HPP diff --git a/include/meevax/kernel/textual_port.hpp b/include/meevax/kernel/textual_port.hpp index 522e392e6..3cbcafd6c 100644 --- a/include/meevax/kernel/textual_port.hpp +++ b/include/meevax/kernel/textual_port.hpp @@ -19,13 +19,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct textual_port : public virtual port {}; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_TEXTUAL_PORT_HPP diff --git a/include/meevax/kernel/transformer.hpp b/include/meevax/kernel/transformer.hpp index 580f709bc..7b07d4bf4 100644 --- a/include/meevax/kernel/transformer.hpp +++ b/include/meevax/kernel/transformer.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct transformer : public virtual pair // ( . ) { @@ -29,7 +27,6 @@ inline namespace kernel }; auto operator <<(std::ostream &, transformer const&) -> std::ostream &; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_TRANSFORMER_HPP diff --git a/include/meevax/kernel/vector.hpp b/include/meevax/kernel/vector.hpp index e2cd5b02b..5a0c0b65d 100644 --- a/include/meevax/kernel/vector.hpp +++ b/include/meevax/kernel/vector.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct heterogeneous_vector : private std::vector { @@ -46,7 +44,6 @@ inline namespace kernel using vector = heterogeneous_vector; auto make_vector(object const&) -> object; // list->vector -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_VECTOR_HPP diff --git a/include/meevax/kernel/version.hpp b/include/meevax/kernel/version.hpp index 59fa108c1..e1a5748bb 100644 --- a/include/meevax/kernel/version.hpp +++ b/include/meevax/kernel/version.hpp @@ -22,16 +22,13 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto help() noexcept -> std::string_view; auto features() -> object const&; auto version() -> object const&; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel #endif // INCLUDED_MEEVAX_KERNEL_VERSION_HPP diff --git a/include/meevax/type_traits/integer.hpp b/include/meevax/type_traits/integer.hpp index cb7a83120..0513675ea 100644 --- a/include/meevax/type_traits/integer.hpp +++ b/include/meevax/type_traits/integer.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace type_traits +namespace meevax::inline type_traits { template struct int8n; @@ -83,7 +81,6 @@ inline namespace type_traits template using uint8n_t = typename uint8n::type; -} // namespace type_traits -} // namespace meevax +} // namespace meevax::type_traits #endif // INCLUDED_MEEVAX_TYPE_TRAITS_INTEGER_HPP diff --git a/include/meevax/type_traits/is_array_subscriptable.hpp b/include/meevax/type_traits/is_array_subscriptable.hpp index 0a2224da8..c608fda05 100644 --- a/include/meevax/type_traits/is_array_subscriptable.hpp +++ b/include/meevax/type_traits/is_array_subscriptable.hpp @@ -19,22 +19,22 @@ #include -namespace meevax -{ -inline namespace type_traits +namespace meevax::inline type_traits { template + [[deprecated]] struct is_array_subscriptable : public std::false_type {}; template + [[deprecated]] struct is_array_subscriptable()[std::declval()])>> : public std::true_type {}; template + [[deprecated]] inline constexpr auto is_array_subscriptable_v = is_array_subscriptable::value; -} // namespace type_traits -} // namespace meevax +} // namespace meevax::type_traits #endif // INCLUDED_MEEVAX_TYPE_TRAITS_IS_ARRAY_SUBSCRIPTABLE_HPP diff --git a/include/meevax/type_traits/is_dereferenceable.hpp b/include/meevax/type_traits/is_dereferenceable.hpp index 1ec3e18cf..381b7fa2c 100644 --- a/include/meevax/type_traits/is_dereferenceable.hpp +++ b/include/meevax/type_traits/is_dereferenceable.hpp @@ -19,20 +19,19 @@ #include -namespace meevax -{ -inline namespace type_traits +namespace meevax::inline type_traits { template + [[deprecated]] struct is_dereferenceable : public std::false_type {}; template + [[deprecated]] struct is_dereferenceable())>> : public std::true_type {}; -} // namespace type_traits -} // namespace meevax +} // namespace meevax::type_traits #endif // INCLUDED_MEEVAX_TYPE_TRAITS_IS_DEREFERENCEABLE_HPP diff --git a/include/meevax/type_traits/is_equality_comparable.hpp b/include/meevax/type_traits/is_equality_comparable.hpp index 9fd6ed4b3..badca8464 100644 --- a/include/meevax/type_traits/is_equality_comparable.hpp +++ b/include/meevax/type_traits/is_equality_comparable.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace type_traits +namespace meevax::inline type_traits { template struct is_equality_comparable @@ -40,7 +38,6 @@ inline namespace type_traits template inline constexpr bool is_equality_comparable_v = is_equality_comparable::value; -} // namespace type_traits -} // namespace meevax +} // namespace meevax::type_traits #endif // INCLUDED_MEEVAX_TYPE_TRAITS_IS_EQUALITY_COMPARABLE_HPP diff --git a/include/meevax/type_traits/is_output_streamable.hpp b/include/meevax/type_traits/is_output_streamable.hpp index eff1212c1..fe43b563c 100644 --- a/include/meevax/type_traits/is_output_streamable.hpp +++ b/include/meevax/type_traits/is_output_streamable.hpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace type_traits +namespace meevax::inline type_traits { template struct is_output_streamable : public std::false_type @@ -35,7 +33,6 @@ inline namespace type_traits template inline constexpr auto is_output_streamable_v = is_output_streamable::value; -} // namespace type_traits -} // namespace meevax +} // namespace meevax::type_traits #endif // INCLUDED_MEEVAX_TYPE_TRAITS_IS_OUTPUT_STREAMABLE_HPP diff --git a/include/meevax/type_traits/is_reference_wrapper.hpp b/include/meevax/type_traits/is_reference_wrapper.hpp index e49419765..2a6820944 100644 --- a/include/meevax/type_traits/is_reference_wrapper.hpp +++ b/include/meevax/type_traits/is_reference_wrapper.hpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace type_traits +namespace meevax::inline type_traits { template struct is_reference_wrapper @@ -32,7 +30,6 @@ inline namespace type_traits struct is_reference_wrapper> : public std::true_type {}; -} // namespace type_traits -} // namespace meevax +} // namespace meevax::type_traits #endif // INCLUDED_MEEVAX_TYPE_TRAITS_IS_REFERENCE_WRAPPER_HPP diff --git a/include/meevax/utility/hexdump.hpp b/include/meevax/utility/hexdump.hpp index e625262f2..ba288dc3c 100644 --- a/include/meevax/utility/hexdump.hpp +++ b/include/meevax/utility/hexdump.hpp @@ -17,7 +17,8 @@ #ifndef INCLUDED_MEEVAX_UTILITY_HEXDUMP #define INCLUDED_MEEVAX_UTILITY_HEXDUMP -#include // std::hex, +#include // std::endian +#include // std::hex #include // std::ostream #include // std::vector @@ -37,13 +38,21 @@ inline namespace utility } {} - // TODO UPDATE WITH STD::ENDIAN (C++20) auto operator()(std::ostream & os) const -> std::ostream & { - for (auto iter = data.rbegin(); iter != data.rend(); ++iter) // little endian - // for (auto iter = data.begin(); iter != data.end(); ++iter) // big endian + if constexpr (std::endian::native == std::endian::little) { - os << std::setw(2) << std::setfill('0') << std::hex << static_cast(*iter) << " "; + for (auto iter = data.rbegin(); iter != data.rend(); ++iter) + { + os << std::setw(2) << std::setfill('0') << std::hex << static_cast(*iter) << " "; + } + } + else + { + for (auto iter = data.begin(); iter != data.end(); ++iter) + { + os << std::setw(2) << std::setfill('0') << std::hex << static_cast(*iter) << " "; + } } return os; diff --git a/src/chrono/duration.cpp b/src/chrono/duration.cpp index 9a8b4f052..b5461e553 100644 --- a/src/chrono/duration.cpp +++ b/src/chrono/duration.cpp @@ -18,9 +18,7 @@ #include -namespace meevax -{ -inline namespace chrono +namespace meevax::inline chrono { auto operator <<(std::ostream & os, std::chrono::nanoseconds nanoseconds) -> std::ostream & { @@ -55,5 +53,4 @@ inline namespace chrono return os; } -} // namespace chrono -} // namespace meevax +} // namespace meevax::chrono diff --git a/src/kernel/binary_input_file_port.cpp b/src/kernel/binary_input_file_port.cpp index 6e71d1855..771506868 100644 --- a/src/kernel/binary_input_file_port.cpp +++ b/src/kernel/binary_input_file_port.cpp @@ -18,9 +18,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto binary_input_file_port::close() -> void { @@ -78,5 +76,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("open-binary-input-file ", datum.name) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/binary_output_file_port.cpp b/src/kernel/binary_output_file_port.cpp index 96e4531bb..028ba632e 100644 --- a/src/kernel/binary_output_file_port.cpp +++ b/src/kernel/binary_output_file_port.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto binary_output_file_port::close() -> void { @@ -53,5 +51,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("open-binary-output-file ", datum.name) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/boolean.cpp b/src/kernel/boolean.cpp index 474e49422..acb1e75bb 100644 --- a/src/kernel/boolean.cpp +++ b/src/kernel/boolean.cpp @@ -17,12 +17,9 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { let const t = make(true); let const f = make(false); -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/boot.cpp b/src/kernel/boot.cpp index 1fb2d6c8a..c37621ef5 100644 --- a/src/kernel/boot.cpp +++ b/src/kernel/boot.cpp @@ -37,9 +37,7 @@ extern char ** environ; // for procedure get-environment-variables -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto boot() -> void { @@ -2339,5 +2337,4 @@ inline namespace kernel }); }); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/box.cpp b/src/kernel/box.cpp index ba7624005..e53aec6c4 100644 --- a/src/kernel/box.cpp +++ b/src/kernel/box.cpp @@ -16,13 +16,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, box const& datum) -> std::ostream & { return os << magenta("#,(") << green("box ") << datum.first << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/character.cpp b/src/kernel/character.cpp index 16de8787e..e91b1f7c2 100644 --- a/src/kernel/character.cpp +++ b/src/kernel/character.cpp @@ -19,9 +19,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { character::operator std::string() const { @@ -79,5 +77,4 @@ inline namespace kernel return os << cyan(static_cast(datum)); } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/closure.cpp b/src/kernel/closure.cpp index e5c9d58a6..e549dc7a0 100644 --- a/src/kernel/closure.cpp +++ b/src/kernel/closure.cpp @@ -16,13 +16,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, closure const& datum) -> std::ostream & { return os << magenta("#,(") << green("closure ") << faint("#;", &datum) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/comparator.cpp b/src/kernel/comparator.cpp index 60013845b..da61e9cb9 100644 --- a/src/kernel/comparator.cpp +++ b/src/kernel/comparator.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto find(object & b) -> object & { @@ -100,5 +98,4 @@ inline namespace kernel auto forest = std::unordered_map(); return equal(x, y, forest); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/complex.cpp b/src/kernel/complex.cpp index 659d61be9..6d397d12d 100644 --- a/src/kernel/complex.cpp +++ b/src/kernel/complex.cpp @@ -19,9 +19,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { complex::complex(std::string const& token, int radix) { @@ -130,5 +128,4 @@ inline namespace kernel return atan(real_part(x), imag_part(x)); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/conditional_expand.cpp b/src/kernel/conditional_expand.cpp index 4907176a7..aa93cc5bf 100644 --- a/src/kernel/conditional_expand.cpp +++ b/src/kernel/conditional_expand.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto test(object const& requirement) -> bool { @@ -70,5 +68,4 @@ inline namespace kernel throw error(make("no matching clauses were found"), clauses); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/continuation.cpp b/src/kernel/continuation.cpp index 49cdda9d2..e02811e29 100644 --- a/src/kernel/continuation.cpp +++ b/src/kernel/continuation.cpp @@ -16,13 +16,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, continuation const& datum) -> std::ostream & { return os << magenta("#,(") << green("continuation ") << faint(";#", std::addressof(datum)) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/dynamic_environment.cpp b/src/kernel/dynamic_environment.cpp index 62264a1a6..9223ec560 100644 --- a/src/kernel/dynamic_environment.cpp +++ b/src/kernel/dynamic_environment.cpp @@ -22,9 +22,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto dynamic_environment::execute(object const& control) -> object { @@ -505,5 +503,4 @@ inline namespace kernel } } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/environment.cpp b/src/kernel/environment.cpp index a27c5324c..39e5afd08 100644 --- a/src/kernel/environment.cpp +++ b/src/kernel/environment.cpp @@ -19,9 +19,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto environment::evaluate(object const& expression) -> object try { @@ -269,5 +267,4 @@ inline namespace kernel template struct configurator; template struct syntactic_environment; -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/eof.cpp b/src/kernel/eof.cpp index 3d94b1220..0881728fc 100644 --- a/src/kernel/eof.cpp +++ b/src/kernel/eof.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { let const eof_object = make(); @@ -26,5 +24,4 @@ inline namespace kernel { return os << magenta("#,(") << green("eof-object") << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/error.cpp b/src/kernel/error.cpp index ec56ed6b2..c3d5aa776 100644 --- a/src/kernel/error.cpp +++ b/src/kernel/error.cpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto error::irritants() const noexcept -> object const& { @@ -190,5 +188,4 @@ inline namespace kernel return os << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/exact_integer.cpp b/src/kernel/exact_integer.cpp index 527f8084e..1ba6f17e9 100644 --- a/src/kernel/exact_integer.cpp +++ b/src/kernel/exact_integer.cpp @@ -20,9 +20,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { let const e0 = make(0); let const e1 = make(1); @@ -102,5 +100,4 @@ inline namespace kernel { return os << cyan(std::unique_ptr(mpz_get_str(nullptr, 10, datum.value)).get()); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/ghost.cpp b/src/kernel/ghost.cpp index eefff637c..589ba02e4 100644 --- a/src/kernel/ghost.cpp +++ b/src/kernel/ghost.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, ghost const& ghost) -> std::ostream & { @@ -28,5 +26,4 @@ inline namespace kernel let const unspecified = make("unspecified"); let const undefined = make("undefined"); -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/identity.cpp b/src/kernel/identity.cpp index df5a8df5c..6f447147d 100644 --- a/src/kernel/identity.cpp +++ b/src/kernel/identity.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, absolute const& datum) -> std::ostream & { @@ -32,5 +30,4 @@ inline namespace kernel return os << blue(datum.first); } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/include.cpp b/src/kernel/include.cpp index df0e0485b..24fc0f8b4 100644 --- a/src/kernel/include.cpp +++ b/src/kernel/include.cpp @@ -19,9 +19,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto include(object const& names, bool case_sensitive, object const& xs) -> object { @@ -53,5 +51,4 @@ inline namespace kernel return reverse(xs); } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/input_file_port.cpp b/src/kernel/input_file_port.cpp index 52a3222d1..23ddddbf2 100644 --- a/src/kernel/input_file_port.cpp +++ b/src/kernel/input_file_port.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto input_file_port::close() -> void { @@ -44,5 +42,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("open-input-file ") << string(datum.name) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/input_string_port.cpp b/src/kernel/input_string_port.cpp index a9e0b251f..a1bae3a3f 100644 --- a/src/kernel/input_string_port.cpp +++ b/src/kernel/input_string_port.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto input_string_port::close() -> void {} @@ -51,5 +49,4 @@ namespace literals return input_string_port(s).read(); } } // namespace literals -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/instruction.cpp b/src/kernel/instruction.cpp index e2e1d9dc3..c09e0744d 100644 --- a/src/kernel/instruction.cpp +++ b/src/kernel/instruction.cpp @@ -18,9 +18,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, instruction const& datum) -> std::ostream & { @@ -55,5 +53,4 @@ inline namespace kernel return os; } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/interaction_environment.cpp b/src/kernel/interaction_environment.cpp index f1ce7ed85..518baf58b 100644 --- a/src/kernel/interaction_environment.cpp +++ b/src/kernel/interaction_environment.cpp @@ -17,14 +17,11 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto interaction_environment() -> object const& { let static const interaction_environment = make(); return interaction_environment; } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/library.cpp b/src/kernel/library.cpp index 7a2e65e59..5e6a27876 100644 --- a/src/kernel/library.cpp +++ b/src/kernel/library.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { library::library(object const& declarations) : declarations { declarations } @@ -106,5 +104,4 @@ inline namespace kernel static auto libraries = std::map(); return libraries; } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/list.cpp b/src/kernel/list.cpp index 4b35dd936..c76b6c84c 100644 --- a/src/kernel/list.cpp +++ b/src/kernel/list.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto make_list(std::size_t size, object const& x) -> object { @@ -441,5 +439,4 @@ inline namespace kernel return length(x) < length(y) ? y : x; } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/number.cpp b/src/kernel/number.cpp index 82b762c3e..41fe499bc 100644 --- a/src/kernel/number.cpp +++ b/src/kernel/number.cpp @@ -24,9 +24,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator + (exact_integer const& a, exact_integer const& b) -> exact_integer { exact_integer n; mpz_add(n.value, a.value, b.value); return n; } auto operator - (exact_integer const& a, exact_integer const& b) -> exact_integer { exact_integer n; mpz_sub(n.value, a.value, b.value); return n; } @@ -1089,5 +1087,4 @@ inline namespace number return apply(f, x); } } // namespace number -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/optimizer.cpp b/src/kernel/optimizer.cpp index daa39b23b..8e895106e 100644 --- a/src/kernel/optimizer.cpp +++ b/src/kernel/optimizer.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { struct analysis { @@ -214,5 +212,4 @@ inline namespace kernel return code; } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/output_file_port.cpp b/src/kernel/output_file_port.cpp index 04a3f10f3..1e0af4c0a 100644 --- a/src/kernel/output_file_port.cpp +++ b/src/kernel/output_file_port.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto output_file_port::close() -> void { @@ -39,5 +37,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("open-output-file ") << datum.name << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/output_string_port.cpp b/src/kernel/output_string_port.cpp index 90b0bdec7..abf841485 100644 --- a/src/kernel/output_string_port.cpp +++ b/src/kernel/output_string_port.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto output_string_port::close() -> void {} @@ -38,5 +36,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("open-output-string ") << string(datum.ostringstream.str()) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/procedure.cpp b/src/kernel/procedure.cpp index ef62ecc20..6daa10d4c 100644 --- a/src/kernel/procedure.cpp +++ b/src/kernel/procedure.cpp @@ -16,13 +16,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, primitive const& datum) -> std::ostream & { return os << magenta("#,(") << green("procedure ") << datum.name << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/ratio.cpp b/src/kernel/ratio.cpp index b6405a4ab..c74132111 100644 --- a/src/kernel/ratio.cpp +++ b/src/kernel/ratio.cpp @@ -18,9 +18,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { ratio::ratio() { @@ -105,5 +103,4 @@ inline namespace kernel return os << cyan(std::unique_ptr(mpq_get_str(nullptr, 10, datum.value), free).get()); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/standard_error_port.cpp b/src/kernel/standard_error_port.cpp index c5c7eabb8..a80e26dc2 100644 --- a/src/kernel/standard_error_port.cpp +++ b/src/kernel/standard_error_port.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto standard_error_port::close() -> void {} @@ -37,5 +35,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("standard-error") << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/standard_input_port.cpp b/src/kernel/standard_input_port.cpp index 4351b0187..623185cd5 100644 --- a/src/kernel/standard_input_port.cpp +++ b/src/kernel/standard_input_port.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { standard_input_port::standard_input_port() { @@ -47,5 +45,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("standard-input") << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/standard_output_port.cpp b/src/kernel/standard_output_port.cpp index dfd7cecfb..45fb5932b 100644 --- a/src/kernel/standard_output_port.cpp +++ b/src/kernel/standard_output_port.cpp @@ -16,9 +16,7 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto standard_output_port::close() -> void {} @@ -37,5 +35,4 @@ inline namespace kernel { return output << magenta("#,(") << blue("standard-output") << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/string.cpp b/src/kernel/string.cpp index 7b1fefed3..8157c9758 100644 --- a/src/kernel/string.cpp +++ b/src/kernel/string.cpp @@ -19,9 +19,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { string::string(std::string const& s) { @@ -87,5 +85,4 @@ inline namespace kernel return os << cyan("\""); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/symbol.cpp b/src/kernel/symbol.cpp index 874ebc491..d4ddff969 100644 --- a/src/kernel/symbol.cpp +++ b/src/kernel/symbol.cpp @@ -19,9 +19,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator +(symbol const& a, symbol const& b) -> std::string { @@ -66,5 +64,4 @@ inline namespace kernel make(name)); } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/textual_input_port.cpp b/src/kernel/textual_input_port.cpp index 7b1fe7fad..9e7ca2fb3 100644 --- a/src/kernel/textual_input_port.cpp +++ b/src/kernel/textual_input_port.cpp @@ -21,9 +21,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { textual_input_port::iterator::iterator(textual_input_port & input) : input { std::addressof(input) } @@ -692,5 +690,4 @@ inline namespace kernel throw read_error(make("an end of file is encountered after the beginning of an object's external representation, but the external representation is incomplete and therefore not parsable")); } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/textual_output_port.cpp b/src/kernel/textual_output_port.cpp index 34cb91722..c04de6091 100644 --- a/src/kernel/textual_output_port.cpp +++ b/src/kernel/textual_output_port.cpp @@ -17,9 +17,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto textual_output_port::flush() -> void { @@ -74,5 +72,4 @@ inline namespace kernel os << x; } } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/transformer.cpp b/src/kernel/transformer.cpp index b6e41ee79..f0a5e1295 100644 --- a/src/kernel/transformer.cpp +++ b/src/kernel/transformer.cpp @@ -16,13 +16,10 @@ #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator <<(std::ostream & os, transformer const& datum) -> std::ostream & { return os << magenta("#,(") << green("transformer ") << faint("#;", &datum) << magenta(")"); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/kernel/vector.cpp b/src/kernel/vector.cpp index 72bd231b4..75bef3d3e 100644 --- a/src/kernel/vector.cpp +++ b/src/kernel/vector.cpp @@ -21,9 +21,7 @@ #include #include -namespace meevax -{ -inline namespace kernel +namespace meevax::inline kernel { auto operator ==(heterogeneous_vector const& v, heterogeneous_vector const& u) -> bool { @@ -49,5 +47,4 @@ inline namespace kernel { return make(xs.begin(), xs.end()); } -} // namespace kernel -} // namespace meevax +} // namespace meevax::kernel diff --git a/src/memory/model.cpp b/src/memory/model.cpp index 99b903677..b68dd8b96 100644 --- a/src/memory/model.cpp +++ b/src/memory/model.cpp @@ -19,9 +19,7 @@ #include -namespace meevax -{ -inline namespace memory +namespace meevax::inline memory { auto model::name() -> char const* { @@ -50,5 +48,4 @@ inline namespace memory throw std::logic_error("unknown C data model"); } } -} // namespace memory -} // namespace meevax +} // namespace meevax::memory diff --git a/src/utility/demangle.cpp b/src/utility/demangle.cpp index d686c8063..c7bfb0024 100644 --- a/src/utility/demangle.cpp +++ b/src/utility/demangle.cpp @@ -22,9 +22,7 @@ #include -namespace meevax -{ -inline namespace utility +namespace meevax::inline utility { auto demangle(char const* const name) -> std::string { @@ -47,5 +45,4 @@ inline namespace utility { return demangle(info.name()); } -} // namespace utility -} // namespace meevax +} // namespace meevax::utility