Skip to content

Commit

Permalink
reduce differences between cpp17 and main branches (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Daniel Smith authored Aug 21, 2023
1 parent 547d0aa commit e7ea728
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
1 change: 1 addition & 0 deletions UnitTest/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define NOMINMAX
#pragma warning(push)
#pragma warning(disable: 5039) // '...': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior
#include <windows.h>
#pragma warning(pop)
#pragma comment(lib, "ws2_32")
Expand Down
11 changes: 0 additions & 11 deletions modules/c++/nitf/include/nitf/SubWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,7 @@ DECLARE_CLASS(SubWindow)
std::optional<std::vector<uint32_t>> bandList;
};

#if CODA_OSS_cpp14
// This template<template> syntax allows an arbitary TContainer<uint32_t> to be passed
// rather than requiring that it be std::vector<uint32_t>. Note that the container
// must support data() and size().
template<template<typename, typename...> typename TContainer, typename ...TAlloc>
inline void setBands(SubWindow& subWindow,
TContainer<uint32_t, TAlloc...>& bandList) // std::vector<T> really has another template parameter

#else
// While the above is legitimate C++11 syntax, older compilers don't like it
inline void setBands(SubWindow& subWindow, std::vector<uint32_t>& bandList)
#endif // CODA_OSS_cpp14
{
subWindow.setBandList(bandList.data());
subWindow.setNumBands(gsl::narrow<uint32_t>(bandList.size()));
Expand Down
4 changes: 0 additions & 4 deletions modules/c++/nitf/include/nitf/System.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ typedef nitf_Off Off;
typedef nitf_AccessFlags AccessFlags;
typedef nitf_CreationFlags CreationFlags;

#if CODA_OSS_cpp17
using byte = std::byte;
#else
using byte = sys::byte;
#endif

using Version = nitf_Version;
using FieldType = nitf_FieldType;
Expand Down

0 comments on commit e7ea728

Please sign in to comment.