Advertisement
Guest User

Untitled

a guest
Dec 4th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. struct parsed_data;
  2. namespace impl {
  3.     constexpr parsed_data parse( const str_const & str );
  4. }
  5.  
  6. template <std::size_t N>
  7. constexpr parsed_data
  8. parse( const char( & a )[ N ] ){
  9.     constexpr str_const input{ a };
  10.     static_assert( check( input ), "Malformed input!" );
  11.     return impl::parse( input );
  12. }
  13.  
  14. int main(){
  15.     parse( "{ Foo : Bar } { Quooz : Baz }" );
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement