-
Notifications
You must be signed in to change notification settings - Fork 104
/
corrade-changelog.dox
1940 lines (1776 loc) · 116 KB
/
corrade-changelog.dox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This file is part of Corrade.
Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017, 2018, 2019, 2020, 2021, 2022, 2023
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
namespace Corrade {
/** @page corrade-changelog Changelog
@tableofcontents
@section corrade-changelog-latest Changes since 2020.06
@subsection corrade-changelog-latest-dependencies Dependency changes
- Minimal supported CMake version is now 3.5, changed from 3.4, since CMake
3.27+ warns if a compatibility with CMake below 3.5 is requested. Older
versions are not supported anymore and all workarounds for them were
removed. This is a conservative change, as there are no known supported
distributions which would have anything older than 3.5.
@subsection corrade-changelog-latest-new New features
- MSVC 2022 support. For that there's a new @ref CORRADE_MSVC_COMPATIBILITY
flag that controls workarounds for MSVC 2019+ with the `/permissive-` flag
not enabled. This supersedes the `CORRADE_MSVC2019_COMPATIBILITY` flag and
can be turned off if `/permissive-` is set for all files that use Corrade.
See also [mosra/corrade#124](https://github.com/mosra/corrade/issues/124).
- New @ref CORRADE_TARGET_WASM preprocessor variable for any (even
non-Emscripten) WebAssembly target, as a complement to
@ref CORRADE_TARGET_X86, @ref CORRADE_TARGET_ARM and
@ref CORRADE_TARGET_POWERPC
- New @ref CORRADE_TARGET_SSE3, @ref CORRADE_TARGET_SSSE3,
@ref CORRADE_TARGET_SSE41, @ref CORRADE_TARGET_SSE42,
@ref CORRADE_TARGET_POPCNT, @ref CORRADE_TARGET_LZCNT,
@ref CORRADE_TARGET_BMI1, @ref CORRADE_TARGET_BMI2,
@ref CORRADE_TARGET_AVX, @ref CORRADE_TARGET_AVX_F16C,
@ref CORRADE_TARGET_AVX_FMA, @ref CORRADE_TARGET_AVX2,
@ref CORRADE_TARGET_AVX512F, @ref CORRADE_TARGET_NEON,
@ref CORRADE_TARGET_NEON_FMA, @ref CORRADE_TARGET_NEON_FP16 and
@ref CORRADE_TARGET_SIMD128 preprocessor variables added to the already
existing @ref CORRADE_TARGET_SSE2 for detecting enabled instruction sets on
x86, ARM and WebAssembly
- New @ref CORRADE_TARGET_32BIT preprocessor variable for cross-platform
detection of 32-bit builds
- New @ref CORRADE_TARGET_CXX14, @ref CORRADE_TARGET_CXX17 and
@ref CORRADE_TARGET_CXX20 convenience macros that provide an easier way to
detect used C++ standard than comparing @ref CORRADE_CXX_STANDARD to some
arbitrary value
- New @ref Cpu namespace that provides building blocks for compile-time and
runtime CPU feature detection and dispatch on x86, ARM and WebAssembly. See
[mosra/corrade#115](https://github.com/mosra/corrade/pull/115),
[mosra/corrade#154](https://github.com/mosra/corrade/pull/154) and
[mosra/corrade#171](https://github.com/mosra/corrade/issues/171).
- Added MSVC Natvis files and pretty-printers for GDB. See
@ref corrade-debuggers,
[mosra/corrade#111](https://github.com/mosra/corrade/issues/111),
[mosra/corrade#147](https://github.com/mosra/corrade/pull/147),
[mosra/corrade#160](https://github.com/mosra/corrade/pull/160),
[mosra/corrade#165](https://github.com/mosra/corrade/pull/165),
[mosra/corrade#172](https://github.com/mosra/corrade/pull/172) and
[mosra/corrade#179](https://github.com/mosra/corrade/issues/179) for more
information.
- For console applications, the @ref main "Corrade::Main" library now
disables showing an assertion dialog on Windows, making them either jump
to the debugger or exit directly. This fixes a problem in non-interactive
scenarios where assertions caused the apps to get stuck forever waiting for
someone to close the dialog.
@subsubsection corrade-changelog-latest-new-containers Containers library
- New @ref Containers::ArrayTuple class for coalescing arrays of homogeneous
types and varying lengths into a single allocation. See also
[mosra/magnum#505](https://github.com/mosra/magnum/issues/505),
[mosra/corrade#116](https://github.com/mosra/corrade/issues/116) and
[mosra/corrade#117](https://github.com/mosra/corrade/pull/117).
- New @ref Containers::BigEnumSet class for storing enum sets with more than
64 values
- New @ref Containers::BitArray,
@ref Containers::BasicBitArrayView "Containers::BitArrayView" and
@ref Containers::BasicStridedBitArrayView "Containers::StridedBitArrayView"
classes for owning and non-owning containers of bits, and a new
@ref Containers::StridedArrayView::sliceBit() helper for easily creating
bit views on complex data
- New @ref Containers::Iterable helper to provide an indirection for
iterating over both containers of values and containers of references in
a single code path, and a @ref Containers::StringIterable doing the same
for strings, string views and plain @cpp char* @ce.
- New @ref Containers::Pair and @ref Containers::Triple classes that fix
various issues and pitfalls of @ref std::pair and provide a lightweight
alternative to a three-element @ref std::tuple
- New @ref Containers::String class as a lightweight but more flexible
alternative to @ref std::string
- New @ref Containers::BasicStringView "Containers::StringView" class as a
lightweight but more flexible alternative to C++17 @ref std::string_view.
See also [mosra/corrade#123](https://github.com/mosra/corrade/issues/123)
and [mosra/corrade#171](https://github.com/mosra/corrade/issues/171).
- New @ref Containers::MoveReference and @ref Containers::AnyReference
counterparts to @ref Containers::Reference for exclusively r-value
references and both l-value and r-value references
- Added a @ref Containers::StridedArrayView::slice() overload for slicing
into @cpp struct @ce members and @cpp class @ce getter functions
- Added @ref Containers::StridedArrayView::expanded() and
@relativeref{Containers,StridedArrayView::collapsed()} view transformation
functions for expanding a dimension to multiple dimensions and collapsing
them back
- New @ref Containers::Array2, @ref Containers::Array3 and
@ref Containers::Array4 convenience aliases for
@ref Containers::StaticArray, together with @ref Containers::Array1 that's
useful in case you want to take advantage of the @ref NoInit tag on an
arbitrary type and @ref Containers::Optional doesn't suit the use case.
- New @ref Containers::ArrayView2, @ref Containers::ArrayView3 and
@ref Containers::ArrayView4 convenience aliases for
@ref Containers::StaticArrayView
- Added a family of @ref Containers::arrayInsert(),
@ref Containers::arrayRemove() and @ref Containers::arrayRemoveUnordered()
functions for arbitrary insertion into and deletion from growable arrays
- Support for C++17 structured bindings for @ref Containers::Pair,
@ref Containers::Triple, @ref Containers::StaticArray,
@ref Containers::StaticArrayView and @ref Containers::StridedDimensions.
See also [mosra/corrade#127](https://github.com/mosra/corrade/pull/127),
[mosra/corrade#157](https://github.com/mosra/corrade/issues/157) and
[mosra/corrade#159](https://github.com/mosra/corrade/pull/159).
@subsubsection corrade-changelog-latest-new-pluginmanager PluginManager library
- The @ref PluginManager library is now free of @ref std::string and
@ref std::vector usage in all its public APIs except the
@ref PluginManager::PluginMetadata class. @ref Containers::StringView,
@ref Containers::String, @ref Containers::ArrayView and
@ref Containers::Array is used instead, resulting in much less temporary
allocations and better compile times.
- New @ref PluginManager::Manager::externalManager() API to allow plugins to
list, access and instantiate plugins of other types
@subsubsection corrade-changelog-latest-new-testsuite TestSuite library
- The @ref TestSuite library is now completely free of all @ref std::string
usage in its public APIs, using only @ref Containers::StringView,
@ref Containers::String or even just plain @cpp const char* @ce where
compile times *really* matter
- New @ref CORRADE_INFO(), @ref CORRADE_WARN(), @ref CORRADE_FAIL() and
@ref CORRADE_FAIL_IF() macros for printing formatted information to the
output and explicitly failing a test
- New @ref CORRADE_SKIP_IF_NO_ASSERT() and
@ref CORRADE_SKIP_IF_NO_DEBUG_ASSERT() helper macros for easier assertion
testing
- New @ref TestSuite::Compare::NotEqual comparator to provide an alternative
to @cpp CORRADE_VERIFY(a != b) @ce with a better failure diagnostic
- New @ref TestSuite::Compare::String comparator that prints a colored
line diff on failure (see also [mosra/corrade#38](https://github.com/mosra/corrade/pull/38))
- New @ref TestSuite::Compare::StringHasPrefix,
@relativeref{TestSuite::Compare,StringHasSuffix},
@relativeref{TestSuite::Compare,StringContains} and
@relativeref{TestSuite::Compare,StringNotContains} comparators to provide
an alternative to @cpp CORRADE_VERIFY(a.hasPrefix(b)) @ce and similar with
a better failure diagnostic
- New @ref TestSuite::Compare::Aligned and
@relativeref{TestSuite::Compare,NotAligned} comparators as a more
convenient alternative to @ref TestSuite::Compare::Divisible and
@relativeref{TestSuite::Compare,NotDivisible} when dealing with pointers
- New @ref TestSuite::TestCaseDescriptionSourceLocation helper for improved
file/line info in instanced test cases
@subsubsection corrade-changelog-latest-new-utility Utility library
- New @ref Utility::flipInPlace() algorithm for in-place flipping of strided
array views
- New @ref Corrade/Utility/BitAlgorithms.h header with
@ref Utility::copyMasked() and other algorithms that use the new
@ref Containers::BitArrayView containers
- @ref Utility::allocateAligned() family of functions for overaligned
allocations, suitable for efficient SIMD operations
- Added @ref Utility::forward(), @ref Utility::move() and
@ref Utility::swap() equivalents to @ref std::forward(),
@m_class{m-doc-external} [std::move()](https://en.cppreference.com/w/cpp/utility/move)
and @ref std::swap() without having to pull in everything else from
@cpp #include <utility> @ce.
- Added @ref Utility::Arguments::addArrayArgument() as a positional
counterpart to @ref Utility::Arguments::addArrayOption()
- @ref Utility::Configuration and @ref Utility::Arguments can now read and
write @ref Containers::String and @ref Containers::StringView values,
@ref Utility::ConfigurationValue can be implemented using those instead of
@ref std::string as well
- @ref Utility::ConfigurationGroup gained an ability to iterate through its
values and subgroups using @relativeref{Utility::ConfigurationGroup,values()}
and @relativeref{Utility::ConfigurationGroup,groups()}
- New @ref Utility::Debug::invertedColor() output modifier for printing
colored text with the foreground and background colors inverted
- New @ref Utility::Debug::hex output modifier for printing integers as
hexadecimal
- New @ref Corrade::Utility::Json class for tokenizing and parsing JSON files
into an immutable memory-efficient representation. See also
[mosra/corrade#174](https://github.com/mosra/corrade/issues/174).
- New @ref Corrade::Utility::JsonWriter class for stream-like writing and
pretty-printing of JSON files
- New @ref Corrade/Utility/Math.h header implementing @ref Utility::min(),
@ref Utility::max() and @ref Utility::abs() because having to
@cpp #include <algorithm> @ce to get @ref std::min() and @ref std::max() is
unacceptable, and similarly but less so for @cpp #include <cmath> @ce to
get @ref std::abs()
- @ref Utility::Resource and @ref corrade-rc "corrade-rc" is now capable of
optional making resources null-terminated and arbitrarily aligned
- Added @ref Utility::String::lowercaseInPlace() and @relativeref{Utility::String,uppercaseInPlace()}
together with @ref Utility::String::lowercase() and
@relativeref{Utility::String,uppercase()} overloads taking a
@ref Containers::StringView
- New @ref Utility::String::parseNumberSequence() utility for parsing number
sequences such as `1-3,5,17`, useful especially for convenient command-line
APIs
- New @ref CORRADE_INTERNAL_ASSERT_EXPRESSION() macro for assertions that can
be evaluated directly inside larger expressions
- New @ref CORRADE_DEBUG_ASSERT(), @ref CORRADE_CONSTEXPR_DEBUG_ASSERT(),
@ref CORRADE_DEBUG_ASSERT_OUTPUT(), @ref CORRADE_DEBUG_ASSERT_UNREACHABLE(),
@ref CORRADE_INTERNAL_DEBUG_ASSERT(),
@ref CORRADE_INTERNAL_CONSTEXPR_DEBUG_ASSERT(),
@ref CORRADE_INTERNAL_DEBUG_ASSERT_OUTPUT(),
@ref CORRADE_INTERNAL_DEBUG_ASSERT_EXPRESSION() and
@ref CORRADE_INTERNAL_DEBUG_ASSERT_UNREACHABLE() macros that expand to
their non-`DEBUG` counterparts on debug builds and get compiled out on
release builds; as well as a @ref CORRADE_NO_DEBUG_ASSERT define for
querying if debug assertions are enabled. See also [mosra/corrade#136](https://github.com/mosra/corrade/issues/136).
- New @ref CORRADE_LIKELY() and @ref CORRADE_UNLIKELY() macros for
instruction cache microoptimizations in tight loops
- New @ref CORRADE_PASSTHROUGH() helper macro, an inverse of
@ref CORRADE_NOOP()
- New @ref CORRADE_CONSTEXPR20 macro, a variant of @ref CORRADE_CONSTEXPR14
for C++20
- New @ref Corrade/Utility/StlForwardTupleSizeElement.h header for
forward-declaring @m_class{m-doc-external} [std::tuple_size](https://en.cppreference.com/w/cpp/utility/tuple_size)
and @m_class{m-doc-external} [std::tuple_element](https://en.cppreference.com/w/cpp/utility/tuple_element)
without having to @cpp #include <utility> @ce or other heavy STL headers.
See also [mosra/corrade#127](https://github.com/mosra/corrade/pull/127).
- Added a `--single` option to the @ref corrade-rc "corrade-rc" executable as
well as @ref corrade-cmake-add-resource "corrade_add_resource(... SINGLE)"
for compiling a single input file into a C++ file containing its binary
representation
@subsection corrade-changelog-latest-changes Changes and improvements
@subsubsection corrade-changelog-latest-changes-containers Containers library
- Assertions in often-called element access and slicing APIs were converted
to @ref CORRADE_DEBUG_ASSERT() and friends, meaning they get compiled out
on release builds for better performance. Complex array casting and slicing
functionality that's prone to user errors still keeps @ref CORRADE_ASSERT()
as these functions are not meant to be called in tight loops and the value
of safety guarantees outweighs negative performance effects.
- @ref Containers::ArrayView::front(), @ref Containers::ArrayView::back(),
@ref Containers::StaticArrayView::front() and
@ref Containers::StaticArrayView::back() is now @cpp constexpr @ce like all
other access APIs
- A new convenience @ref Containers::Array::Array(ArrayView<T>, D) overload
for constructing non-owned @ref Containers::Array instances from existing
views
- Added @ref Containers::arrayShrink(Array<T>&, DefaultInitT) overload for
cases where it's not desired to have an @ref Containers::Array with a
`NoInit` deleter
- Added @ref Containers::arrayResize(Array<T>&, std::size_t, const typename std::common_type<T>::type&)
as a convenience shorthand for @ref Containers::arrayResize(Array<T>&, DirectInitT, std::size_t, Args&&... args)
- @ref Containers::arrayAppend(Array<T>&, typename std::common_type<ArrayView<const T>>::type) and
@ref Containers::arrayAppend(Array<T>&, NoInitT, std::size_t) are now no-op
in case the item count is zero
- Added a @ref Containers::EnumSet::EnumSet(UnderlyingType) constructor to
match how builtin @cpp enum @ce can be explictly constructed from its
underlying integer representation
- Added an ability to construct a @ref Containers::StridedArrayView1D from a
pointer and size, the same way as with contiguous array views
- Added @ref Containers::StaticArray::StaticArray(InPlaceInitT, const T(&)[size_])
and @ref Containers::StaticArray::StaticArray(InPlaceInitT, T(&&)[size_])
for more convenience with in-place creation of arrays of complex types.
- Added a @ref Containers::StridedArrayView constructor from a strided view
with less dimensions
- Added a @ref Containers::stridedArrayView(ArrayView<T>, std::size_t, std::ptrdiff_t)
helper to complement @ref Containers::stridedArrayView(ArrayView<typename StridedArrayView1D<T>::ErasedType>, T*, std::size_t, std::ptrdiff_t)
- @ref Containers::Array::Array(InPlaceInitT, std::initializer_list<T>)
constructor is no longer @cpp explicit @ce to allow for easier use in
initializer lists
- Added a @ref Containers::Pointer::emplace() "Containers::Pointer<T>::emplace<U>()"
overload for in-place construction of a derived type
- @ref Containers::ScopeGuard now has a @ref NoCreate constructor and is
movable in order to support deferred creation
- Added a templated overload of @ref Containers::StridedArrayView::asContiguous()
that flattens the view only from given dimension further, returning a
@relativeref{Containers,StridedArrayView} again
- @ref Containers::LinkedList destruction was changed in a way that makes
@ref Containers::LinkedListItem::list() still accessible in a destructor
of @ref Containers::LinkedListItem subclasses
- @ref Containers::Pointer, @ref Containers::Optional,
@ref Containers::Reference, @ref Containers::MoveReference and
@ref Containers::AnyReference gained a @relativeref{Containers::Pointer,Type}
member typedef for consistency with other containers
- @ref Containers::StridedArrayView can now be used in STL algorithms such as
@ref std::lower_bound() if you include @ref Corrade/Containers/StridedArrayViewStl.h
- Added @ref Containers::StridedArrayView::operator[](const Containers::Size<dimensions>&) const
for directly accessing individual elements in multi-dimensional views
- Added convenience @ref Containers::Size, @ref Containers::Size1D,
@ref Containers::Size2D, @ref Containers::Size3D, @ref Containers::Size4D,
@ref Containers::Stride, @ref Containers::Stride1D,
@ref Containers::Stride2D, @ref Containers::Stride3D and
@ref Containers::Stride4D aliases for @ref Containers::StridedDimensions
- All classes that have a constructor taking a single pointer or
@ref std::nullptr_t argument now prevent ambiguity when used in function
overloads together with an integer argument and called with @cpp 0 @ce
- @ref Containers::StaticArray of types that are either trivially
constructible or have a @ref NoInit constructor are now usable in
@cpp constexpr @ce contexts and trivially copyable if the underlying type
is
@subsubsection corrade-changelog-latest-changes-pluginmanager PluginManager library
- The @cmake corrade_add_plugin() @ce and
@cmake corrade_add_static_plugin() @ce
@ref corrade-cmake-add-plugin "CMake macros" now allow the metadata file
path to be absolute as well, which is useful when the file has the contents
generated.
@subsubsection corrade-changelog-latest-changes-testsuite TestSuite library
- Added a @ref TestSuite::Tester::testName() getter, used by Magnum Vulkan
tests to provide application name for each executable
- New @ref TestSuite::Tester::setTestCaseTemplateName() overload taking a
list of strings for test cases templated by more than one parameter
- The @ref CORRADE_VERIFY() macro now now accepts varargs, meaning that you
no longer need to wrap expressions containing commas in extra parentheses
- The @ref CORRADE_SKIP(), @ref CORRADE_EXPECT_FAIL() and
@ref CORRADE_EXPECT_FAIL_IF() macros now accept messages in the same form
as @ref CORRADE_ASSERT(), that is anything that can be printed with
@ref Utility::Debug as well as chaining the pieces with @cpp << @ce.
- Test executables now accept `-X` and `-S` as a shorthand to often used
`--abort-on-fail` and `--save-diagnostic`
@ref TestSuite-Tester-command-line "command-line options"
- When the `--no-catch` option is passed, @ref TestSuite::Tester doesn't
rethrow exceptions derived from @ref std::exception but instead lets them
go directly to make the backtrace point to the original exception location
and not to where it got rethrown from.
- The `--skip` and `--only` @ref TestSuite::Tester options now accept a more
flexible syntax from @ref Utility::String::parseNumberSequence(), allowing
arbitrary ranges to be specified in a succint way
- @ref TestSuite::Compare::SortedContainer can now work with non-copyable
containers (such as @ref Containers::Array) and containers without random
access (such as @ref std::list or @ref std::unordered_map).
- Added @ref TestSuite::Tester::BenchmarkUnits::RatioThousandths and
@relativeref{TestSuite::Tester::BenchmarkUnits,PercentageThousandths} for
benchmarks that output fractional values and percentages
@subsubsection corrade-changelog-latest-changes-utility Utility library
- @ref Utility::Arguments can now recognize short options packed together
(e.g. `-xzOfile.dat` is equivalent to `-x -z -O file.dat` providing `-x`
and `-z` are boolean options)
- @ref Utility::Arguments now recognizes long options in the `--option=value`
form in addition to `--option value`, and there's a related new
@ref Utility::Arguments::ParseError::InvalidBooleanOption error state.
- Removed unnecessarily excessive @cpp char** @ce overloads in
@ref Utility::Arguments in favor of a single one (see
[mosra/corrade#](https://github.com/mosra/corrade/pull/142))
- New @ref Utility::copy(std::initializer_list<typename ToView::Type>, To&&)
overload for easy populating of arrays and views
- @cpp !Debug{} @ce or @ref Utility-Debug-source-location "source location output in Debug"
is now enabled on MSVC 2019 16.6+ as well, making it available across all
compilers
- @ref Utility::Debug now accepts also a C++17 @ref std::string_view if
you include @ref Corrade/Utility/DebugStlStringView.h
- Improved error handling in @ref Utility::Path APIs where all APIs now
consistently print an error code and message coming from the system on
failure instead of a generic message or nothing at all. See also
[mosra/corrade#164](https://github.com/mosra/corrade/issues/164).
- @ref Utility::Path::isDirectory() now follows symlinks on Unix platforms
- @ref Utility::Path::ListFlag::SkipFiles and
@ref Utility::Path::ListFlag::SkipDirectories passed to
@ref Utility::Path::list() now affects symlinks as well --- previously they
were treated as neither, now they get correctly skipped based on whether
the target is a file or a directory
- @ref Utility::Path::ListFlag::SkipSpecial passed to
@ref Utility::Path::list() now has no effect on Emscripten, the same
as on Windows, as those two platforms have no notion of a special file.
Previously this behaved equivalently to
@ref Utility::Path::ListFlag::SkipFiles on Emscripten but that made no
sense from a portability point of view.
- @ref Utility::Path::size(), @relativeref{Utility::Path,read()} and
@relativeref{Utility::Path,copy()} now explicitly check if the path is a
directory and fail in that case, instead of returning nonsense, crashing on
an allocation failure or silently doing the wrong thing
- Implemented @ref Utility::Path::executableLocation() on FreeBSD (see
[mosra/corrade#171](https://github.com/mosra/corrade/issues/171))
- Added @ref Utility::Resource::hasFile() as a counterpart to
@ref Utility::Resource::hasGroup() for querying whether a filename is
contained in a resource group
- @ref Utility::format() now supports printing integers as characters using
the @cpp "{:c}" @ce modifier
- @ref Utility::format() now accepts also a C++17 @ref std::string_view if
you include @ref Corrade/Utility/FormatStlStringView.h
- @ref Utility::String::split() and
@ref Utility::String::splitWithoutEmptyParts() now have
@ref Containers::StringView overloads that allocate much less
- Added a @ref Utility::String::replaceAll(Containers::String, char, char)
overload for more optimal single-character replacement and a
@ref Utility::String::replaceAllInPlace(Containers::MutableStringView, char, char)
variant that can work on existing memory
- Ability to print @ref Containers::BasicStringView and
@ref Containers::String using @ref Utility::format()
- Creating an empty path with @ref Utility::Path::make() now succeeds because
it makes no sense to fail for such case
- @ref Utility::IsStringLike now recognizes also C++17 @ref std::string_view
by checking for a @cpp substr() @ce member instead of @cpp c_str() @ce
- The @ref CORRADE_LONG_DOUBLE_SAME_AS_DOUBLE macro is now defined on
Emscripten always, because even if it's @cpp long double @ce is 80-bit
sometimes, it doesn't actually have the precision of a 80-bit
representation
- The @ref CORRADE_FALLTHROUGH macro is implemented on MSVC 2019 16.6 if
compiling as C++17.
- The @ref CORRADE_ASSUME() macro now uses @cpp __attribute__((assume)) @ce
on GCC 13+, which should lead to [better optimization opportunities](https://wg21.link/p1774r8)
compared to @cpp if(!(condition)) __builtin_unreachable() @ce
- Minor exception guarantee improvements (see [mosra/corrade#148](https://github.com/mosra/corrade/pull/148))
@subsection corrade-changelog-latest-buildsystem Build system
- The library now uses `-fno-strict-aliasing` on GCC and contains this flag
also in the `CORRADE_PEDANTIC_COMPILER_OPTIONS` @ref corrade-cmake "CMake variable".
Strict aliasing was disabled for the Magnum library since 2013 already,
this change just brings it to all Magnum-related projects and makes it
public.
- The oldest supported Clang version is now 6.0 (available on Ubuntu 18.04),
or equivalently Apple Clang 10.0 (Xcode 10). Oldest supported GCC version
is still 4.8.
- The `-o` option in the @ref acme utility now treats the argument as a file
if it doesn't exist and a directory only if it exists and is a directory
(see [mosra/corrade#90](https://github.com/mosra/corrade/issues/90))
- Fixed a potential error in `UseCorrade.cmake` that would happen when
compiling with an unrecognized compiler (see [mosra/magnum#457](https://github.com/mosra/magnum/issues/457))
- The `version.h` header now gets populated from Git correctly also when
inside a CMake subproject
- The @cmake corrade_add_test() @ce, @cmake corrade_add_plugin() @ce,
@cmake corrade_add_static_plugin() @ce and @cmake corrade_add_resource() @ce
CMake functions now check for presence of the targets they depend on,
giving the user a clear message in case something is missing (see
[mosra/corrade#101](https://github.com/mosra/corrade/pull/101))
- Attempted a switch of Emscripten build on Travis CI from macOS to Ubuntu +
Docker for 2x faster build times in a futile attempt to not use the
extremely expensive features of a no-longer-free service. Ultimately,
Travis banned everyone from using their CI and so all Linux, macOS,
Emscripten, Android and iOS builds were migrated from Travis to Circle CI,
together with adding also an explicit ARM64 build. See
[mosra/corrade#105](https://github.com/mosra/corrade/pull/105),
[mosra/magnum#350](https://github.com/mosra/magnum/issues/350) and
[mosra/magnum#523](https://github.com/mosra/magnum/issues/523).
- On CMake 3.16 and newer, `FindCorrade.cmake` can provide additional details
if some component is not found
- The Homebrew package now uses `std_cmake_args` instead of hardcoded build
type and install prefix, which resolves certain build issues (see
[mosra/homebrew-magnum#6](https://github.com/mosra/homebrew-magnum/pull/6))
- @ref CORRADE_DEPRECATED_ENUM() is now a no-op for Qt's Meta Object Compiler
as it caused parse errors on older Qt versions
- With CMake 3.20 and newer it's possible to compile for Android NDK r19+
without explicitly supplying various system paths. Additionally, when `CMAKE_INSTALL_PREFIX` points to Android NDK sysroot, the `LIB_SUFFIX`
gets autodetected to a correct triplet + API level version subdirectory,
making the installed project discoverable by both vanilla CMake and Gradle.
On CMake 3.16 to 3.19 it's required to set two extra variables for the
same effect. See @ref building-corrade-cross-android and
[mosra/magnum#310](https://github.com/mosra/magnum/issues/310) for more
information.
- Updated Debian build instructions to pass `--no-sign` to
`dpkg-buildpackage`, avoiding a confusing error message that might lead
people to think the packaging failed (see [mosra/magnum-plugins#105](https://github.com/mosra/magnum-plugins/issues/105))
- Updated Emscripten toolchains to not pass `-s WASM` to the compiler, as
only the linker needs it and recent versions complain loudly (see
[mosra/toolchains#16](https://github.com/mosra/toolchains/pull/16))
- Updated Emscripten toolchains to set `CMAKE_<LANG>_COMPILER` to the cache
so MSVC IntelliSense can work with it (see
[mosra/toolchains#17](https://github.com/mosra/toolchains/pull/17))
- @ref Corrade/Utility/Memory.h now has @cpp #include <malloc.h> @ce on
Windows as well instead of declaring aligned memory allocation functions on
its own, as it's not worth the seriously-looking compiler warnings (see
[mosra/corrade#145](https://github.com/mosra/corrade/issues/145))
- Platforms that support @ref CORRADE_CPU_USE_IFUNC will now build certain
code paths optimized for multiple architectures, with the best variant
selected at runtime using the @ref Cpu library based on available CPU
features. This behavior can be disabled with the
@ref CORRADE_BUILD_CPU_RUNTIME_DISPATCH CMake option. Platforms without
IFUNC support implement runtime dispatch using function pointers instead of
indirect functions and have this currently disabled by default.
- Various warning fixes (see [mosra/corrade#151](https://github.com/mosra/corrade/pull/151))
- Preventing a build error on Emscripten if `CORRADE_UTILITY_USE_ANSI_COLORS`
is passed to CMake (see [mosra/corrade#153](https://github.com/mosra/corrade/issues/153))
- The @ref corrade-cmake-add-test "corrade_add_test()" CMake macro now
recognizes a new `CORRADE_TESTSUITE_TEST_TARGET` CMake variable to put
tests into a dedicated target instead of building them as part of the
implicit `ALL` target.
- Updated @ref Corrade/Utility/StlForwardArray.h and
@ref Corrade/Utility/StlForwardTuple.h to work on libc++ 16
- On Windows there's a new `CORRADE_BUILD_STATIC_UNIQUE_GLOBALS_DLL_NAME`
@ref building-corrade-features "CMake option" to aid
@ref CORRADE_BUILD_STATIC_UNIQUE_GLOBALS in cases where Corrade is only
linked to a DLL but not the main executable.
- Worked around a compilation failure on MSVC 2022 with
`/fsanitize=address /std:c++17 /permissive-`, where a definition of
`__sanitizer_annotate_contiguous_container()` in
@ref Corrade/Containers/GrowableArray.h would conflict with MSVC's own in
`<vector>` that additionally has a `noexcept` specifier
- Made it possible to optionally find TestSuite via @cmake find_package() @ce
without causing a fatal error if not found on platforms that need
additional runner files like XCTest, Android and Emscripten. See also
[mosra/corrade#170](https://github.com/mosra/corrade/pull/170).
- It's now possible to build dynamic libraries on Android and Emscripten with
the usual options. Static libraries are still a default but it isn't
enforced anymore. See [mosra/corrade#170](https://github.com/mosra/corrade/pull/170).
- Fixed a build error related to the `environ` variable on macOS versions
before 10.8. See [mosra/corrade#175](https://github.com/mosra/corrade/pull/175).
- The Emscripten toolchain now prefers include directory located in the
Emscripten cache, which as of Emscripten 3.0.4 contains the `version.h`
header. See [mosra/corrade#133](https://github.com/mosra/corrade/issues/133).
- The Emscripten toolchain now uses the `-flto` flag instead of `--llvm-lto`,
which was specific to the fastcomp backend that's removed as of Emscripten
2.0, and sets up correct `emar` to be used for LTO. See
[mosra/toolchains#13](https://github.com/mosra/toolchains/issues/13),
[mosra/toolchains#14](https://github.com/mosra/toolchains/pull/14) and
[mosra/magnum#490](https://github.com/mosra/magnum/issues/490).
- The Emscripten build now uses `--js-library` instead of inline `EM_ASM()`
for calling into JavaScript. This allows it to properly specify its runtime
dependencies without risking breakages when new Emscripten versions make
more JS API functions optional, and circumvents the need for users to
specify `-s EXPORTED_FUNCTIONS` on their side.
- @ref Utility::Path::copy() now uses an 8 kB buffer instead of 128 kB to not
crash on Emscripten 3.1.27+, which reduced the default stack size from
5 MB to 64 kB.
- New @cpp #pragma ACME forget @ce option in the @ref acme utility
- `/OPT:NOICF` is now added for the @ref Interconnect library for clang-cl
as well (see [mosra/corrade#178](https://github.com/mosra/corrade/issues/178))
- The Emscripten toolchain no longer uses a `*.bc` extension for static
libraries, as that breaks builds with version 3.1.52+. See
[mosra/magnum#633](https://github.com/mosra/magnum/issues/633) for more
information.
@subsection corrade-changelog-latest-bugfixes Bug fixes
- @ref Containers::arrayReserve() was not correctly propagating an explicit
allocator argument when checking for capacity, using always the implicit
one, and thus resulting in unnecessary reallocation in some cases
@ref Containers::arrayAppend(Array<T>&, std::initializer_list<typename std::common_type<T>::type>) was not
correctly propagating an explicit allocator argument, causing the array to
be always reallocated using the implicit one
- @ref Utility::Path::libraryLocation() documentation now mentions caveats
related to position-independent code on Unix platforms and the
corresponding test was fixed to ensure the preconditions are met. See also
[mosra/corrade#135](https://github.com/mosra/corrade/issues/135).
- @ref Utility::Path::list() was leaking the file handle on Windows (see
[mosra/corrade#99](https://github.com/mosra/corrade/pull/99))
- Fixed @ref Utility::Path::move() to overwrite the destination if it exists
also on Windows, consistently with other platforms (see
[mosra/corrade#143](https://github.com/mosra/corrade/pull/143))
- Fixed @ref Utility::Path::homeDirectory() and
@relativeref{Utility::Path,configurationDirectory()} to not use an old
Windows API that tends to prefer OneDrive over local user directories
(see [mosra/corrade#144](https://github.com/mosra/corrade/pull/144))
- Added GCC 4.8-specific workarounds to @ref Containers::Array, growable
array utils, @ref Containers::Optional, @ref Containers::Pointer and
@ref Containers::StaticArray where using @cpp T{b} @ce or
@cpp T{std::move(b)} @ce to perform copy/move-construction on a plain
@cpp struct @ce would cause GCC 4.8 to attempt to construct the members
directly instead of invoking a copy/move-constructor, using @cpp () @ce
instead works.
- When crosscompiling with Corrade as a CMake subproject and not using
@cmake find_package() @ce, @cmake corrade_add_resource() @ce failed late
during build on the `Corrade::rc` target not being defined (see
[mosra/corrade#101](https://github.com/mosra/corrade/pull/101))
- On Emscripten, @ref Utility::Arguments used an internal allocation
function, which changed signature in 2.0.5 and caused runtime failures
when `-s ASSERTIONS` was enabled. A public stable API is now used instead,
see [mosra/corrade#106](https://github.com/mosra/corrade/pull/106).
- @ref Containers::Array growable utilities, @ref Containers::String,
@ref Utility::copy(), @ref Utility::format() and @ref Utility::Sha1 was
fixed to not call @ref std::memcpy() with @cpp nullptr @ce when size is
zero (see [mosra/corrade#102](https://github.com/mosra/corrade/issues/102))
- Fixed @ref Utility::Arguments to produce an error instead of asserting in
case a positional argument is specified as named
- Deep @ref Utility::ConfigurationGroup assignments didn't properly reassign
the @relativeref{Utility::ConfigurationGroup,configuration()} pointer,
leading to an assertion on save
- @ref Corrade/Utility/StlForwardTuple.h was fixed to do a full
@cpp #include <tuple> @ce on libstdc++ before version 7 as there a forward
declaration is not available
- @ref Utility::Tweakable was not correctly parsing @cpp unsigned long long @ce
literals, truncating them to 32 bits
- Tests ran using CTest under Emscripten used to have
`--stack-trace-limit=0` set, preventing Node.js from printing a backtrace
on exception. This was originally needed because historically Emscripten
applications didn't correctly propagate @cpp main() @ce return codes, which
had to be worked around by throwing an exception instead. This workaround
became obsolete and got removed in 2017, but this option was left there by
accident. Now it's removed as well.
- @ref PluginManager::Manager no longer dies on startup on an internal
assertion if duplicate static plugins are encountered. This can happen when
a static plugin is linked to multiple dynamic libraries or modules which
then get used in a single executable.
- Calling @ref PluginManager::AbstractManager::setPreferredPlugins() with a
plugin of given alias being instantiated led to an internal assertion when
the plugin got later unloaded.
- Fixed @ref PluginManager::AbstractManager::load() and
@relativeref{PluginManager::Manager,loadAndInstantiate()} to properly
interpret non-absolute plugin filenames as relative to current working
directory instead of passing them directly to OS APIs, which then attempt
to load them from OS-specific locations and fail
- @ref TestSuite::Compare::SortedContainer no longer modifies order of
referenced elements when non-owning views are passed to it
- Fixed the @ref CORRADE_CONSTEXPR14 macro be empty on MSVC 2015, which
doesn't support C++14 relaxed constexpr rules yet. See also
[mosra/corrade#152](https://github.com/mosra/corrade/pull/152).
- Fixed the @cmake corrade_add_resource() @ce CMake macro to properly trim
trailing whitespace before looking for files for dependency tracking.
- Adapted a @ref Containers::ArrayView and @ref Containers::StaticArrayView
test related to @cpp constexpr @ce usage to expect a strange failure on
Clang 14 with AddressSanitizer enabled. Fixed again in Clang 15, although
no related bug report or commit was found. See also
[mosra/corrade#135](https://github.com/mosra/corrade/issues/135).
- Fixed the library to build and pass tests when @ref CORRADE_NO_ASSERT or
@ref CORRADE_STANDARD_ASSERT is defined.
- Fixed three more cases of a "chosen constructor is explicit in
copy-initialization" C++ featurebug when using growable
@ref Containers::Array APIs and @ref Containers::StaticArray with
a struct that has a member with an explicit default constructor.
@subsection corrade-changelog-latest-deprecated Deprecated APIs
- All @ref building-corrade-features "CMake build options" are now prefixed
with `CORRADE_`. For backwards compatibility, unless
@ref CORRADE_BUILD_DEPRECATED is disabled and unless a prefixed option is
already set during the initial run, the unprefixed options are still
recognized with a warning. In particular, if `BUILD_DEPRECATED` is set but
`CORRADE_BUILD_DEPRECATED` not, the unprefixed options are also recognized.
See also [mosra/corrade#139](https://github.com/mosra/corrade/issues/139).
- @cpp Containers::Array::empty() @ce, @cpp ArrayView::empty() @ce,
@cpp StaticArray::empty() @ce, @cpp StaticArrayView::empty() @ce and
@cpp StridedArrayView::empty() @ce is deprecated in favor of
@ref Containers::Array::isEmpty,
@relativeref{Containers,ArrayView::isEmpty()},
@relativeref{Containers,StaticArray::isEmpty()},
@relativeref{Containers,StaticArrayView::isEmpty()} and
@relativeref{Containers,StridedArrayView::isEmpty()}. The original name was chosen only to match what STL did, but it could be confused with "make the
array empty" (i.e., what `clear()` does) and it was inconsistent with all
other APIs returning a @cpp bool @ce as well as the new
@ref Containers::String and @ref Containers::BasicStringView "StringView"
APIs, which all use `isSomething()` instead.
- @ref Containers::Array, @relativeref{Containers,ArrayView},
@relativeref{Containers,StaticArray},
@relativeref{Containers,StaticArrayView} and
@relativeref{Containers,StridedArrayView} slicing APIs were reworked for
more consistency. In particular:
- @cpp except() @ce is deprecated in favor of
@relativeref{Containers::ArrayView,exceptSuffix()}, being consistent
with the new @ref Containers::StringView::exceptSuffix(StringView) const
API
- @cpp suffix() @ce is deprecated in favor of
@relativeref{Containers::ArrayView,exceptPrefix()}, being consistent
with the new @ref Containers::StringView::exceptPrefix(StringView) const
API, as both take a prefix length, and not suffix length. The
@cpp suffix() @ce API, taking a suffix length instead of an offset, is
scheduled to be reintroduced once enough time passes after the
deprecated API gets removed to avoid silent breakages in existing code.
- `Size` and `Stride` typedefs in @ref Containers::StridedArrayView are
deprecated in favor of @relativeref{Containers,Size},
@relativeref{Containers,Size1D}, @relativeref{Containers,Size2D},
@relativeref{Containers,Size3D}, @relativeref{Containers,Size4D},
@relativeref{Containers,Stride}, @relativeref{Containers,Stride1D},
@relativeref{Containers,Stride2D}, @relativeref{Containers,Stride3D} and
@relativeref{Containers,Stride4D} aliases living directly in the
@ref Containers namespace, as those are significantly shorter to type
- @cpp Utility::Directory::isSandboxed() @ce is deprecated in favor of
@ref Utility::System::isSandboxed(), as that's the better place for this
API to live in
- All other @cpp Utility::Directory @ce APIs are deprecated in favor of a new
@ref Utility::Path namespace. It uses the more efficient
@ref Containers::StringView instead of @ref std::string for function
arguments and non-owned return values, @ref Containers::String
instead of @ref std::string for owned return values, wraps return values
for all failable APIs in a @ref Containers::Optional and makes various API
naming cleanups and clarifications. Because of the sweeping nature of the
changes, it was not possible to make these updates
in @cpp Utility::Directory @ce directly, as it would cause basically all
existing code to break. Thus the new APIs are in a completely new
namespace:
- @cpp Utility::Directory::fromNativeSeparators() @ce and
@cpp toNativeSeparators() @ce is deprecated in favor
of @ref Utility::Path::fromNativeSeparators() and
@relativeref{Utility::Path,toNativeSeparators()}
- @cpp Utility::Directory::path() @ce and @cpp filename() @ce is
deprecated in favor of @ref Utility::Path::split() that returns both
parts together
- @cpp Utility::Directory::splitExtension() @ce is deprecated in favor of
@ref Utility::Path::splitExtension()
- @cpp Utility::Directory::join() @ce is deprecated in favor of
@ref Utility::Path::join()
- @cpp Utility::Directory::list() @ce, @cpp Flag @ce and @cpp Flags @ce
are deprecated in favor of @ref Utility::Path::list(),
@relativeref{Utility::Path,ListFlag} and
@relativeref{Utility::Path,ListFlags}, returning the list wrapped in a
@ref Containers::Optional
- @cpp Utility::Directory::mkpath() @ce, @cpp rm() @ce and
@cpp move() @ce are deprecated in favor of @ref Utility::Path::make(),
@relativeref{Utility::Path,remove()} and
@relativeref{Utility::Path,move()}
- @cpp Utility::Directory::current() @ce, @cpp libraryLocation() @ce,
@cpp executableLocation() @ce, @cpp home() @ce,
@cpp configurationDir() @ce and @cpp tmp() @ce are deprecated in favor
of @ref Utility::Path::currentDirectory(),
@relativeref{Utility::Path,libraryLocation()},
@relativeref{Utility::Path,executableLocation()},
@relativeref{Utility::Path,homeDirectory()},
@relativeref{Utility::Path,configurationDirectory()} and
@relativeref{Utility::Path,temporaryDirectory()}, all returning the
path wrapped in a @ref Containers::Optional
- @cpp Utility::Directory::exists() @ce and @cpp isDirectory() @ce is
deprecated in favor of @ref Utility::Path::exists() and
@relativeref{Utility::Path,isDirectory()}
- @cpp Utility::Directory::fileSize() @ce is deprecated in favor of
@ref Utility::Path::size()
- @cpp Utility::Directory::read() @ce is deprecated in favor of
@ref Utility::Path::read(), returning a @ref Containers::Optional
- @cpp Utility::Directory::readString() @ce is deprecated in favor of
@ref Utility::Path::readString(), returning a
@ref Containers::String in a @ref Containers::Optional, transferring
the memory ownership from a @ref Containers::Array instead of making a
copy
- @cpp Utility::Directory::write() @ce, @cpp writeString() @ce,
@cpp append() @ce and @cpp appendString() @ce are deprecated in favor
of @ref Utility::Path::write() and
@relativeref{Utility::Path,append()}. Because a
@ref Containers::StringView is implicitly convertible to a
@ref Containers::ArrayView<const void>, there's no need for a dedicated
string overload anymore.
- @cpp Utility::Directory::copy() @ce is deprecated in favor of
@ref Utility::Path::copy(),
- @cpp Utility::Directory::map() @ce, @cpp mapRead() @ce,
@cpp mapWrite() @ce and @cpp MapDeleter @ce are deprecated in favor of
@ref Utility::Path::map(), @relativeref{Utility::Path,mapRead()},
@relativeref{Utility::Path,mapWrite()} and
@relativeref{Utility::Path,MapDeleter}, returning the mapped array
wrapped in an @ref Containers::Optional
- The @ref Utility::Resource class was ported to use
@ref Containers::StringView instead of @ref std::string,
@cpp Utility::Resource::get() @ce is deprecated in favor of
@ref Utility::Resource::getString(). The @cpp get() @ce API is scheduled to
be reintroduced --- with a @ref Containers::ArrayView return type
consistent with @ref Utility::Path::read() and
@ref Utility::Path::readString() --- once enough time passes after the
deprecated API gets removed to avoid silent breakages in existing code.
- @ref Utility::String::split() and
@ref Utility::String::splitWithoutEmptyParts() overloads taking
@ref Containers::BasicStringView are deprecated in favor of
@ref Containers::BasicStringView::split() and
@ref Containers::BasicStringView::splitWithoutEmptyParts();
the overloads taking @ref std::string are still kept
- @cpp Utility::String::viewBeginsWith() @ce and
@cpp Utility::String::viewEndsWith() @ce variants of
@ref Utility::String::beginsWith() / @ref Utility::String::endsWith() are
deprecated in favor of @ref Containers::BasicStringView::hasPrefix() and
@ref Containers::BasicStringView::hasSuffix(); the overloads taking
@ref std::string are still kept
- @cpp CORRADE_ALIGNAS() @ce and @cpp CORRADE_NORETURN @ce macros are
deprecated as they were originally introduced for compatibility with GCC
4.7 and older and aren't needed anymore. Use the standard C++11
@cpp alignas() @ce and @cpp [[noreturn]] @ce attributes instead.
- The @ref CORRADE_ASSUME() macro is moved from @ref Corrade/Utility/Assert.h
to @ref Corrade/Utility/Macros.h, as it's a lightweight annotation that
doesn't depend on any debug output. If @ref CORRADE_BUILD_DEPRECATED is
enabled, the @ref Corrade/Utility/Assert.h pulls it in for backwards
compatibility.
- The `CORRADE_UTILITY_DEBUG_HAS_SOURCE_LOCATION` macro, which was closely
tied to @ref Utility::Debug, is deprecated in favor of a more general
@ref CORRADE_SOURCE_LOCATION_BUILTINS_SUPPORTED that's defined inside
@ref Corrade/Utility/TypeTraits.h instead.
- The `CORRADE_STD_IS_TRIVIALLY_TRAITS_SUPPORTED` macro is deprecated in
favor of @ref CORRADE_NO_STD_IS_TRIVIALLY_TRAITS, which is defined only if
the traits aren't supported, and is moved to @ref Corrade/Corrade.h. This
solves a recurring problem where forgetting to include
@ref Corrade/Utility/TypeTraits.h led to the traits checks being silently
skipped, while forgetting to include with the inverse macro would lead to a
non-silent compiler error on GCC 4. Additionally it prepares better for
future removal of GCC < 5 support.
- The `CORRADE_INCLUDE_INSTALL_PREFIX` CMake variable, needed for
installations into older Android NDKs, is obsolete and no longer needed for
NDK r19+. It still does what's expected on builds with
`CORRADE_BUILD_DEPRECATED` enabled, however you'll get a deprecation
notice. Since the variable got saved to CMake cache, to get rid of the
message, you may need to either recreate your build directory or explicitly
delete it from the cache.
- The @cpp Corrade/Containers/Tags.h @ce header,
@cpp Containers::DefaultInit @ce, @cpp Containers::ValueInit @ce,
@cpp Containers::NoInit @ce, @cpp Containers::NoCreate @ce,
@cpp Containers::DirectInit @ce, @cpp Containers::InPlaceInit @ce and
related tag types were moved to @ref Corrade/Tags.h and the root
@ref Corrade namespace, available as @ref DefaultInit, @ref ValueInit,
@ref NoInit, @ref NoCreate, @ref DirectInit, @ref InPlaceInit and related
tag types
- @ref PluginManager and @ref TestSuite APIs that switched from
@ref std::string to @ref Containers::StringView or @ref Containers::String
now include @ref Corrade/Containers/StringStl.h for compatibility when
building with @ref CORRADE_BUILD_DEPRECATED enabled. Include this header
explicitly in your code if you wish to continue to rely on implicit
conversion from a @ref std::string.
- To avoid unconditionally including relatively heavy headers,
@ref PluginManager::Manager now has the template definitions moved into
@ref Corrade/PluginManager/Manager.hpp. This header is implicitly included
from the `*.h` for backwards compatibility if @ref CORRADE_BUILD_DEPRECATED
is defined. While nothing changes when using builtin Corrade and Magnum
plugin interfaces, for custom interfaces you need to either include this header explicitly or perform an explicit template instantiation as
described in @ref PluginManager-Manager-template-definitions.
@subsection corrade-changelog-latest-compatibility Potential compatibility breakages, removed APIs
- All includes of @ref Corrade/Containers/PointerStl.h that were added in
2019.01 for preserving backwards compatibility after the move from
@ref std::unique_ptr to @ref Containers::Pointer are now removed. This
should have a significant positive effect on compile times of code using
especially the @ref PluginManager library.
- @cpp Containers::ScopedExit @ce, deprecated in 2019.01, is removed, use
@ref Containers::ScopeGuard instead
- Removed the `CORRADE_CXX_FLAGS` CMake variable, which was deprecated in
favor of the `CORRADE_USE_PEDANTIC_FLAGS` target property in 2016.
- Removed a dependency of `UseCorrade` on `UseEmscripten` to allow 3rd party
Emscripten toolchains to be used. This may break code that uses the
@cmake emscripten_embed_file() @ce CMake function, to fix that either
explicitly @cmake include(UseEmscripten) @ce or update the `toolchains`
submodule, which now includes the file implicitly. See
[mosra/corrade#104](https://github.com/mosra/corrade/issues/104).
- @ref Containers::Array, @relativeref{Containers,StaticArray},
@relativeref{Containers,ArrayView}, @relativeref{Containers,StaticArrayView},
@relativeref{Containers,String} and @relativeref{Containers,StringView} now
contain debug assertions for OOB element access, if necessary implementing
an @cpp operator[]() @ce instead of relying on implicit pointer
conversions. Code that previously inadvertently made out-of-bound access
will now assert in debug builds.
- @ref Containers::arrayAllocatorCast() used to be allowed on
@cpp nullptr @ce @ref Containers::Array instances regardless of their
allocator but attempting to query capacity of such array or do any growable
operation on it then resulted in a crash. It's now checked by an assert,
which may cause breakages in existing code that attempted to call this API
on default-constructed or empty arrays.
- @ref Containers::LinkedList destruction was changed in a way that makes
@ref Containers::LinkedListItem::list() still accessible in a destructor
of @ref Containers::LinkedListItem subclasses. This behavior didn't make
sense and so it's not assumed any existing code relied on it, nevertheless
it's a subtle change in behavior that is worth mentioning.
- @ref Containers::Pointer destructor and
@relativeref{Containers::Pointer,reset()} now contain a
@cpp static_assert() @ce that checks for the type being complete. This
avoids accidentally calling @cpp delete @ce on a pointer to an incomplete
type, which doesn't call the type destructors properly and can lead to
resource leaks. Existing code where this silently happened will now fail to
compile and has to be updated as documented in
@ref Containers-Pointer-incomplete-types.
- @ref Containers::Pointer conversion from a derived type and
@relativeref{Containers::Pointer,emplace()} with a derived type now contain
a @cpp static_assert() @ce that checks for either the base type having a
virtual destructor or the derived type being trivially destructible. If
neither of these is true, attempting to @cpp delete @ce through the base
pointer would lead to resource leaks as the derived type destructor would
never get called. Existing code where this silently happened will now fail
to compile and has to be updated.
- @ref PluginManager::AbstractManager::pluginList() and
@relativeref{PluginManager::AbstractManager,aliasList()} now return a
@ref Containers::Array of @ref Containers::String instead of a
@ref std::vector of @ref std::string. As the change was done to avoid
including a heavy @ref std::vector, no backwards compatibility is done.
- Overrides of @ref PluginManager::AbstractPlugin::pluginInterface(),
@relativeref{PluginManager::AbstractPlugin,pluginSuffix()} and
@relativeref{PluginManager::AbstractPlugin,pluginMetadataSuffix()} are now
expected to return a global @ref Containers::StringView, i.e. a string view
literal, instead of a @ref std::string. Since a global view has to be
explicitly made, no backwards compatibility can be provides
- Override of @ref PluginManager::AbstractPlugin::pluginSearchPaths() is now
expected to return a @ref Containers::Array of @ref Containers::String
instead of a @ref std::vector of @ref std::string, similarly
@ref PluginManager::implicitPluginSearchPaths() is changed to match that.
As the change was done to avoid including a heavy @ref std::vector, no
backwards compatibility is done.
- Due to changes to @ref CORRADE_SKIP() internals, passing a @ref std::string
to it now requires an explicit @cpp #include <Corrade/Utility/DebugStl.h> @ce.
Alternatively, if string concatenation was used, you can compose the
message by chaining @ref Utility::Debug output operators instead.
- @ref Utility::String::replaceFirst() and @ref Utility::String::replaceAll()
is now operating on a @ref Containers::StringView and returns a
@ref Containers::String. The original @ref std::string overloads had to be
removed as they caused various ambiguities, so using these functions with
@ref std::string may now need extra casts.
- @ref Utility::String::lowercase() and @ref Utility::String::uppercase()
now has overloads for both @ref Containers::StringView and
@ref std::string, which may cause ambiguous overload errors for existing
code that passes @cpp const char* @ce to it. Given that either type is
valid now, the code has to be updated to explicitly pass that type to the
function.
- @ref Utility::format() now returns a @ref Containers::String instead of
@ref Containers::Array and @ref Utility::formatInto() now takes a
@ref Containers::MutableStringView instead of @ref Containers::ArrayView.
The types are however implicitly convertible and thus breakages are not
expected in majority of existing code.
- Printing a C++17 @ref std::string_view with @ref Utility::Debug now
requires the @ref Corrade/Utility/DebugStlStringView.h include. Before it
was printed as a numeric container due to @ref Utility::IsStringLike not
recognizing it.
- @cpp Utility::Resource::compile() @ce and
@cpp Utility::Resource::compileFrom() @ce APIs are no longer public, but
rather a private detail of the @ref corrade-rc "corrade-rc" utility.
- @cpp Utility::Resource::list() @ce now returns a
@ref Containers::StringIterable instead of a @ref std::vector of
@ref std::string. Because the reason for this change was to get rid of
@cpp #include <vector> @ce, no backwards compatibility is provided.
- As part of the ongoing STL usage cleanup,
@ref Utility::TweakableParser is now expected to return a
@ref Containers::Pair instead of @ref std::pair
- As part of the ongoing STL usage cleanup, the @ref Utility::Unicode
namespace now uses @ref Containers::Pair and @ref Containers::StringView,
all uses of @ref std::pair and @ref std::string were removed. The
@ref Utility::Unicode::utf32() API now returns a
@ref Containers::Array "Containers::Array<char32_t>" wrapped in a
@ref Containers::Optional. @ref Utility::Unicode::narrow() and
@relativeref{Utility::Unicode,widen()} variants taking a view or a char
pointer now return either a @ref Containers::String or a
@ref Containers::Array "Containers::Array<wchar_t>" instead of
@ref std::string or @ref std::wstring. @ref Corrade/Containers/PairStl.h
is included for implicit conversions to a @ref std::pair and
@ref Corrade/Containers/StringStl.h is included for implicit conversions
from/to a @ref std::string, but there's no implicit conversion for
@ref std::wstring or @ref std::u32string.
@subsection corrade-changelog-latest-documentation Documentation
- Added a @ref Containers-mapping "table mapping between STL and Corrade containers"
- New and thorough documentation for the @ref Utility::Resource class
- Various fixes (see [mosra/corrade#108](https://github.com/mosra/corrade/pull/108),
[mosra/corrade#119](https://github.com/mosra/corrade/pull/119),
[mosra/corrade#120](https://github.com/mosra/corrade/pull/120),
[mosra/magnum#600](https://github.com/mosra/magnum/issues/600),
[mosra/corrade#161](https://github.com/mosra/corrade/pull/161))
@section corrade-changelog-2020-06 2020.06
Released 2020-06-27, tagged as
[v2020.06](https://github.com/mosra/corrade/releases/tag/v2020.06).
@subsection corrade-changelog-2020-06-new New features
- Clang-CL is now a supported compiler on Windows. See also
[mosra/corrade#40](https://github.com/mosra/corrade/issues/40).
- New @ref CORRADE_TARGET_GCC, @ref CORRADE_TARGET_CLANG,
@ref CORRADE_TARGET_APPLE_CLANG, @ref CORRADE_TARGET_CLANG_CL,
@ref CORRADE_TARGET_MSVC and @ref CORRADE_TARGET_MINGW variables for easier
compiler identification
- New @ref CORRADE_TARGET_SSE2 providing an *extremely minimal* SIMD feature
detection. More extensions to come later.
- New @ref CORRADE_TARGET_BIG_ENDIAN macro. A variant of this macro called
just @cpp CORRADE_BIG_ENDIAN @ce was used internally for a long time, now
it's been exposed publicly.
- New @ref CORRADE_CONSTEXPR14 macro for marking @cpp constexpr @ce functions
that make use of C++14 relaxed constexpr rules but still need to work under
C++11 as well.
@subsubsection corrade-changelog-2020-06-new-containers Containers library
- New @ref Containers::arrayAppend(), @ref Containers::arrayReserve() family
of functions for opt-in growable arrays. See @ref Containers-Array-growable
and [mosra/corrade#83](https://github.com/mosra/corrade/issues/83) for more
information.
- Added @ref Containers::arrayCast() overloads for casting from the
@ref Containers::ArrayView<void> and @ref Containers::ArrayView<const void>
specializations
- New @ref Containers::StridedArrayView<dimensions, void> and
@ref Containers::StridedArrayView<dimensions, const void> together with
corresponding @ref Containers::arrayCast() overloads for type-erased
@cpp constexpr @ce enabled passing of strided array views similarly to the
existing @ref Containers::ArrayView<void> and
@ref Containers::ArrayView<const void> types
- New @ref Containers::stridedArrayView() convenience overload taking
explicit stride and size parameters
- New @ref Containers::array(std::initializer_list<T>),
@ref Containers::arrayView(std::initializer_list<T>) and
@ref Containers::stridedArrayView(std::initializer_list<T>) helpers for
turning initializer lists into (strided) array(view)s. These are