Skip to main content
4 events
when toggle format what by license comment
Dec 21, 2018 at 19:02 comment added Jerry Coffin @hoffmale: if you want to restrict functions to a specific TU, an anonymous namespace is generally preferred.
Dec 21, 2018 at 16:32 comment added hoffmale "don't declare free functions static" - unless you want to explicitly restrict them to that specific translation unit (e.g. because it's an implementation detail not intended to be part of the public API). (This might also allow for better optimization, though I wouldn't suggest doing so just because of this reason.) // For printing, you suggest a call to std::transform with a std::ostream_iterator for std::cout and some custom logic also printing to std::cout. Methinks it would be cleaner to just use a std::for_each call and placing all printing logic into the lambda.
Dec 21, 2018 at 14:42 history edited papagaga CC BY-SA 4.0
transform char[] into std::array<char, mbr_size>
Dec 21, 2018 at 14:26 history answered papagaga CC BY-SA 4.0