Skip to content

Commit

Permalink
remove redundant macros
Browse files Browse the repository at this point in the history
  • Loading branch information
voivoid committed Apr 9, 2017
1 parent d17d8d4 commit 2d0e0bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ add_library(BsonParser STATIC
src/parsers.cpp
)

find_package(Boost 1.63.0 REQUIRED)
find_package(Boost 1.63.0 REQUIRED COMPONENTS filesystem)
target_link_libraries(BsonParser Boost::boost)

target_include_directories(BsonParser PUBLIC inc)
target_compile_options(BsonParser PUBLIC -Wall -Wextra -Werror -pedantic -std=c++1z)

if(NOT MSVC)
target_compile_options(BsonParser PUBLIC -Wall -Wextra -Werror -pedantic -std=c++1z)
endif()
add_executable(BsonParserApp src/app/main.cpp)
target_link_libraries(BsonParserApp BsonParser Boost::boost Boost::filesystem)

enable_testing()

Expand Down
11 changes: 0 additions & 11 deletions src/parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ typename std::enable_if_t<std::is_pod<T>::value> write(const T value, Ostream& s
stream.write(reinterpret_cast<const Byte*>(&value), sizeof(value));
}

#define BSON_INSTANTIATE_FUNCS(type) \
template type read(Istream& iter); \
template void write(const type value, Ostream& iter);

BSON_INSTANTIATE_FUNCS(Byte);
BSON_INSTANTIATE_FUNCS(Int32);
BSON_INSTANTIATE_FUNCS(Int64);
BSON_INSTANTIATE_FUNCS(Uint64);
BSON_INSTANTIATE_FUNCS(Double);
BSON_INSTANTIATE_FUNCS(Decimal);

template <>
String read(Istream& stream)
{
Expand Down

0 comments on commit 2d0e0bd

Please sign in to comment.